diff options
author | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2018-12-05 11:04:44 +0100 |
---|---|---|
committer | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2019-02-26 09:45:54 +0100 |
commit | caa9bb3a131ed8bcef7eae1d153ece6c20bc116c (patch) | |
tree | dfbfd0228ff8030e467a279daf52a214136bf6a8 | |
parent | 7cc428962158ed4335d998a5cd447050d423e618 (diff) |
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 <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
-rw-r--r-- | lib/drmtest.c | 10 | ||||
-rw-r--r-- | lib/drmtest.h | 2 |
2 files changed, 12 insertions, 0 deletions
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)); +} diff --git a/lib/drmtest.h b/lib/drmtest.h index 8743b1bb..ca347a71 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -80,8 +80,10 @@ int __drm_open_driver(int chipset); void gem_quiescent_gpu(int fd); void igt_require_intel(int fd); +void igt_require_vc4(int fd); bool is_i915_device(int fd); +bool is_vc4_device(int fd); /** * do_or_die: |