diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-13 17:15:36 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-13 20:45:50 +0000 |
commit | 6cca22ede8a448d341b3e4565943f54bd8b8dcd0 (patch) | |
tree | ef93c1f8c869118b2a3fe9c89b053b6ce270becf /drivers/gpu/drm/i915/i915_gem_dmabuf.c | |
parent | a8fb2bad82b64047d9c6090b859467cacc69e9d2 (diff) | |
download | op-kernel-dev-6cca22ede8a448d341b3e4565943f54bd8b8dcd0.zip op-kernel-dev-6cca22ede8a448d341b3e4565943f54bd8b8dcd0.tar.gz |
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.c | 5 |
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 d037adc..3e276ee 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 |