summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_dmabuf.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-02-13 17:15:36 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-02-13 20:45:50 +0000
commit6cca22ede8a448d341b3e4565943f54bd8b8dcd0 (patch)
treeef93c1f8c869118b2a3fe9c89b053b6ce270becf /drivers/gpu/drm/i915/i915_gem_dmabuf.c
parenta8fb2bad82b64047d9c6090b859467cacc69e9d2 (diff)
downloadlinux-stable-6cca22ede8a448d341b3e4565943f54bd8b8dcd0.tar.gz
linux-stable-6cca22ede8a448d341b3e4565943f54bd8b8dcd0.tar.bz2
linux-stable-6cca22ede8a448d341b3e4565943f54bd8b8dcd0.zip
drm/i915: Add some mock tests for dmabuf interop
Check that we can create both dmabuf and objects from dmabuf. v2: Cleanups, correct include, fix unpin on dead path and prevent explosion on dmabuf init failure Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-25-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_dmabuf.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_dmabuf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index d037adcda6f2..3e276eee0450 100644
--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
@@ -307,3 +307,8 @@ fail_detach:
return ERR_PTR(ret);
}
+
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+#include "selftests/mock_dmabuf.c"
+#include "selftests/i915_gem_dmabuf.c"
+#endif