Commit caa9bb3a authored by Paul Kocialkowski's avatar Paul Kocialkowski

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's avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
Reviewed-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
parent 7cc42896
......@@ -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));
}
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment