]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vgem: Enable dmabuf interface for export
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 Jul 2016 13:08:07 +0000 (14:08 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 12 Jul 2016 10:44:25 +0000 (12:44 +0200)
commit877c92ce8ea1cefc68332744cdde47ab66e632d7
tree3812c1881dd040f56675d3674e8b9a3ab4bec9a0
parenta26d63c09d7783a336c45aeceea2b1d9ba343238
drm/vgem: Enable dmabuf interface for export

Enable the standard GEM dma-buf interface provided by the DRM core, but
only for exporting the VGEM object. This allows passing around the VGEM
objects created from the dumb interface and using them as sources
elsewhere. Creating a VGEM object for a foriegn handle is not supported.

v2: With additional completeness.
v3: Need to clear the CPU cache upon exporting the dma-addresses.
v4: Use drm_gem_put_pages() as well.
v5: Use drm_prime_pages_to_sg()

Testcase: igt/vgem_basic/dmabuf-*
Testcase: igt/prime_vgem
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Zach Reizner <zachr@google.com>
Acked-by: Zach Reizner <zachr@google.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1468242488-1505-3-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/vgem/vgem_drv.c