summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/selftests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-02-13 18:15:37 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-02-13 21:45:51 +0100
commitced01afdf672d6ceab71f14e0aefb79b914ddd34 (patch)
treed49360cceb1492610e704b8fe1bd9d2e52fc3e41 /drivers/gpu/drm/i915/selftests
parentdrm/i915: Add some mock tests for dmabuf interop (diff)
downloadlinux-ced01afdf672d6ceab71f14e0aefb79b914ddd34.tar.xz
linux-ced01afdf672d6ceab71f14e0aefb79b914ddd34.zip
drm/i915: Add a live dmabuf selftest
Though we have good coverage of our dmabuf interface through the mock tests, we also want to check the heavy module unload paths of the live i915 driver. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-26-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c9
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_live_selftests.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c
index a2393fcf9fa8..817bef74bbcb 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c
@@ -292,3 +292,12 @@ int i915_gem_dmabuf_mock_selftests(void)
drm_dev_unref(&i915->drm);
return err;
}
+
+int i915_gem_dmabuf_live_selftests(struct drm_i915_private *i915)
+{
+ static const struct i915_subtest tests[] = {
+ SUBTEST(igt_dmabuf_export),
+ };
+
+ return i915_subtests(tests, i915);
+}
diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
index be7892d05290..fc605695d118 100644
--- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
+++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
@@ -12,4 +12,5 @@ selftest(sanitycheck, i915_live_sanitycheck) /* keep first (igt selfcheck) */
selftest(uncore, intel_uncore_live_selftests)
selftest(requests, i915_gem_request_live_selftests)
selftest(objects, i915_gem_object_live_selftests)
+selftest(dmabuf, i915_gem_dmabuf_live_selftests)
selftest(coherency, i915_gem_coherency_live_selftests)