summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-02-09 10:16:51 +0100
committerDaniel Stone <daniels@collabora.com>2016-04-14 13:54:24 +0100
commit3fee80efcfb41cc7f25afa968bb38e68faa6c34c (patch)
tree76aedab17652fefd6cdb946ffb29f7f41718c52e /lib/drmtest.c
parent0eadf638e4e11394adcb574b986f5dea077d4a4c (diff)
lib: add igt_require_intel
Add function that requires that the driver we are talking to is i915. This allows us to skip subtests that are specific to that driver. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 02ba57ee..a0669dd5 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -379,3 +379,8 @@ int drm_open_driver_render(int chipset)
return fd;
}
+
+void igt_require_intel(int fd)
+{
+ igt_require(is_i915_device(fd) && has_known_intel_chipset(fd));
+}