winsys/amdgpu: use drmGetDevice2 API
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 1 Dec 2016 19:54:39 +0000 (19:54 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 15 Mar 2017 11:37:58 +0000 (11:37 +0000)
Analogous to previous commit

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index bf7a0573990d07c839a59194c7e472571e5184bc..37e01403113e7b75d4edb24b167102bfba6902ac 100644 (file)
@@ -108,9 +108,9 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
    drmDevicePtr devinfo;
 
    /* Get PCI info. */
-   r = drmGetDevice(fd, &devinfo);
+   r = drmGetDevice2(fd, 0, &devinfo);
    if (r) {
-      fprintf(stderr, "amdgpu: drmGetDevice failed.\n");
+      fprintf(stderr, "amdgpu: drmGetDevice2 failed.\n");
       goto fail;
    }
    ws->info.pci_domain = devinfo->businfo.pci->domain;