[Mesa-dev] [PATCH v2 3/6] winsys/amdgpu: use drmGetDevice2 API

Emil Velikov emil.l.velikov at gmail.com
Wed Feb 15 15:51:56 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

Analogous to previous commit

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index db0087c094..ecbef6bca8 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -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;
-- 
2.11.0



More information about the mesa-dev mailing list