From 22779a7a1ae8e9b0676b55e973d600671dd74f1c Mon Sep 17 00:00:00 2001 From: Gustavo Padovan Date: Thu, 30 Jun 2016 18:29:47 -0300 Subject: lib/drmtest: add virtio_gpu support Support the virtio GPU on drmtest. Signed-off-by: Gustavo Padovan Signed-off-by: Daniel Vetter --- lib/drmtest.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/drmtest.c') diff --git a/lib/drmtest.c b/lib/drmtest.c index 42581035..a0454092 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -115,6 +115,11 @@ static bool is_vgem_device(int fd) return __is_device(fd, "vgem"); } +static bool is_virtio_device(int fd) +{ + return __is_device(fd, "virt"); +} + static bool has_known_intel_chipset(int fd) { struct drm_i915_getparam gp; @@ -260,6 +265,10 @@ int __drm_open_driver(int chipset) is_vgem_device(fd)) return fd; + if (chipset & DRIVER_VIRTIO && + is_virtio_device(fd)) + return fd; + close(fd); } -- cgit v1.2.3