summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-10-17 10:05:20 +0200
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2016-10-27 09:51:42 +0200
commit9921aff583acfcde3b79c133faa0644804d67ebc (patch)
treef80244c84f72dba5c7ac844cec469004670900b3 /lib/drmtest.c
parent37c9be1db3966e1fee87ec3942da25980201ee1b (diff)
lib/drmtest: Take DRIVER_ANY into account when opening the DRM device
__drm_open_driver was changed to bail out on VGEM devices unless they are explicitly asked for (DRIVER_VGEM). But with that change we lost support for DRIVER_ANY. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Fixes: 7ce63894854d ("lib: Support opening vGEM device") Cc: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 5d3aaa83..786ffa1b 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -269,6 +269,10 @@ int __drm_open_driver(int chipset)
is_virtio_device(fd))
return fd;
+ /* Only VGEM-specific tests should be run on VGEM */
+ if (chipset & DRIVER_ANY && !is_vgem_device(fd))
+ return fd;
+
close(fd);
}