From caa9bb3a131ed8bcef7eae1d153ece6c20bc116c Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Wed, 5 Dec 2018 11:04:44 +0100 Subject: lib: drmtest: Add helpers to check and require the VC4 driver In order to add support for features specific to the VC4 driver, add helpers for checking and requiring the driver like it's done for the i915 driver. Signed-off-by: Paul Kocialkowski Reviewed-by: Lyude Paul Reviewed-by: Maxime Ripard --- lib/drmtest.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/drmtest.c') diff --git a/lib/drmtest.c b/lib/drmtest.c index 6c0a0e38..6506791b 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -106,6 +106,11 @@ bool is_i915_device(int fd) return __is_device(fd, "i915"); } +bool is_vc4_device(int fd) +{ + return __is_device(fd, "vc4"); +} + static bool has_known_intel_chipset(int fd) { struct drm_i915_getparam gp; @@ -484,3 +489,8 @@ void igt_require_intel(int fd) { igt_require(is_i915_device(fd) && has_known_intel_chipset(fd)); } + +void igt_require_vc4(int fd) +{ + igt_require(is_vc4_device(fd)); +} -- cgit v1.2.3