diff mbox

[libdrm,5/5] tests/drmdevice: use drmGetDevice[s]2

Message ID 20161130203511.18910-5-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Emil Velikov Nov. 30, 2016, 8:35 p.m. UTC
From: Emil Velikov <emil.velikov@collabora.com>

... alongside the DRM_DEVICE_IGNORE_PCI_REVISION flag.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 tests/drmdevice.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/tests/drmdevice.c b/tests/drmdevice.c
index 72e7066..dcad527 100644
--- a/tests/drmdevice.c
+++ b/tests/drmdevice.c
@@ -70,7 +70,7 @@  main(void)
     drmDevicePtr device;
     int fd, ret, max_devices;
 
-    max_devices = drmGetDevices(NULL, 0);
+    max_devices = drmGetDevices2(DRM_DEVICE_IGNORE_PCI_REVISION, NULL, 0);
 
     if (max_devices <= 0) {
         printf("drmGetDevices() has returned %d\n", max_devices);
@@ -83,7 +83,7 @@  main(void)
         return -1;
     }
 
-    ret = drmGetDevices(devices, max_devices);
+    ret = drmGetDevices2(DRM_DEVICE_IGNORE_PCI_REVISION, devices, max_devices);
     if (ret < 0) {
         printf("drmGetDevices() returned an error %d\n", ret);
         free(devices);
@@ -102,7 +102,7 @@  main(void)
                     continue;
                 }
 
-                if (drmGetDevice(fd, &device) == 0) {
+                if (drmGetDevice2(fd, DRM_DEVICE_IGNORE_PCI_REVISION, &device) == 0) {
                     print_device_info(device, i);
                     drmFreeDevice(&device);
                 }