From: Emil Velikov Date: Thu, 1 Dec 2016 19:54:39 +0000 (+0000) Subject: winsys/amdgpu: use drmGetDevice2 API X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=858170e8a40c2fcd1c47750944c5d5c10178241f;p=mesa.git winsys/amdgpu: use drmGetDevice2 API Analogous to previous commit Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502 Signed-off-by: Emil Velikov Reviewed-by: Michel Dänzer Reviewed-by: Marek Olšák Reviewed-by: Eric Engestrom Tested-by: Mike Lothian --- diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index bf7a0573990..37e01403113 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;