summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-02-18 14:25:43 +0100
committerDaniel Stone <daniels@collabora.com>2016-04-14 13:54:24 +0100
commite0e3a063ae3680ad1848dcf16d54f51c8d1f459a (patch)
tree331185a9d60d635c8ff6201aa9e3cad01a0e1d1f
parent6755757e9f71918949ac02e6971d97fa662c1ba2 (diff)
lib: Expose is_i915_device
Lib and test code can use this function to avoid i915-specific behavior when running on other drivers. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--lib/drmtest.c2
-rw-r--r--lib/drmtest.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index a0669dd5..1d350e72 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -90,7 +90,7 @@ static int __get_drm_device_name(int fd, char *name)
return -1;
}
-static bool is_i915_device(int fd)
+bool is_i915_device(int fd)
{
int ret;
char name[5] = "";
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 5d38f142..c391464d 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -84,6 +84,8 @@ void gem_quiescent_gpu(int fd);
void igt_require_intel(int fd);
+bool is_i915_device(int fd);
+
/**
* do_or_die:
* @x: command