OSDN Git Service

i915g: add dma-buf support to i915_drm_buffer_get_handle
authorNicholas Bishop <nbishop@neverware.com>
Thu, 8 Sep 2016 19:55:03 +0000 (15:55 -0400)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 27 Sep 2016 12:37:21 +0000 (13:37 +0100)
commitc060f291c26ac22721a515c78c7a4779f389ff7e
tree7e284f71a50ce038410e847872d789fb66ba54ed
parentaa560e8e6328acd5b8feec1fea54dec06ae21368
i915g: add dma-buf support to i915_drm_buffer_get_handle

The implementation of i915_drm_buffer_get_handle now handles
DRM_API_HANDLE_TYPE_FD in the same way that intel_winsys_import_handle
does, by calling drm_intel_bo_gem_create_from_prime.

Tested by successfully running Chrome's ozone_demo [1] with the
ozone-gbm backend on an Intel Pineview M machine. Without this change
it fails while trying to create a DMA-BUF.

[1] https://chromium.googlesource.com/chromium/src.git/+/master/ui/ozone/demo/ozone_demo.cc

Signed-off-by: Nicholas Bishop <nbishop@neverware.com>
[Emil Velikov: Fix coding style]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/winsys/i915/drm/i915_drm_buffer.c