[Intel-gfx] [i-g-t PATCH v1 01/14] lib: add igt_require_intel

Tomeu Vizoso tomeu.vizoso at collabora.com
Wed Mar 2 14:00:08 UTC 2016


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 at collabora.com>
---

 lib/drmtest.c | 5 +++++
 lib/drmtest.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 7b2227fe0f6a..bb9ca507a922 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -399,3 +399,8 @@ int drm_open_driver_render(int chipset)
 
 	return fd;
 }
+
+void igt_require_intel(int fd)
+{
+	igt_require(is_i915_device(fd) && is_intel(fd));
+}
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 9fcab9316bc4..af7da37d5ff8 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
-- 
2.5.0



More information about the Intel-gfx mailing list