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

Emil Velikov emil.l.velikov at gmail.com
Fri Mar 10 12:27: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 c9f5235991..783567fa5b 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -124,9 +124,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.1



More information about the mesa-dev mailing list