summaryrefslogtreecommitdiff
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
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>
-rw-r--r--lib/drmtest.c5
-rw-r--r--lib/drmtest.h2
2 files changed, 7 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));
+}
diff --git a/lib/drmtest.h b/lib/drmtest.h
index d4884666..5d38f142 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -82,6 +82,8 @@ int __drm_open_driver(int chipset);
void gem_quiescent_gpu(int fd);
+void igt_require_intel(int fd);
+
/**
* do_or_die:
* @x: command