[Mesa-dev] [PATCH v2 4/6] radv/winsys: use drmGetDevice2 API

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


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

Analogous to previous commit

Cc: Dave Airlie <airlied at redhat.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
index 35b6bc57a4..b66f6a1222 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -123,9 +123,9 @@ do_winsys_init(struct radv_amdgpu_winsys *ws, int fd)
 	int r;
 	int i, j;
 	/* 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