[Mesa-dev] [PATCH 4/6] radv/winsys: use drmGetDevice[s]2 API

Emil Velikov emil.l.velikov at gmail.com
Fri Dec 2 16:31:47 UTC 2016


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

Analogous to previous commit

Cc: Michel Dänzer <michel.daenzer at amd.com>
Cc: Dave Airlie <airlied at redhat.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.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 b2e171a..014e4e9 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -122,9 +122,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.10.2



More information about the mesa-dev mailing list