lib: add igt_require_intel

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@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Tomeu Vizoso 2016-02-09 10:16:51 +01:00 committed by Daniel Stone
parent 0eadf638e4
commit 3fee80efcf
2 changed files with 7 additions and 0 deletions

View File

@ -379,3 +379,8 @@ int drm_open_driver_render(int chipset)
return fd; return fd;
} }
void igt_require_intel(int fd)
{
igt_require(is_i915_device(fd) && has_known_intel_chipset(fd));
}

View File

@ -82,6 +82,8 @@ int __drm_open_driver(int chipset);
void gem_quiescent_gpu(int fd); void gem_quiescent_gpu(int fd);
void igt_require_intel(int fd);
/** /**
* do_or_die: * do_or_die:
* @x: command * @x: command