[i-g-t PATCH v2 02/17] lib: add igt_require_intel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---

Changes in v2:
- Rename is_intel to has_known_intel_chipset as suggested by Chris
  Wilson.

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

diff --git a/lib/drmtest.c b/lib/drmtest.c
index b00f423d539b..2f847c85c30a 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -401,3 +401,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 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux