winsys/amdgpu: use drmGetDevice2 API

Analogous to previous commit

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
This commit is contained in:
Emil Velikov 2016-12-01 19:54:39 +00:00 committed by Emil Velikov
parent a50c4eb2a0
commit 858170e8a4

View file

@ -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;