OSDN Git Service

egl: android: add dma-buf fd support
authorRob Herring <robh@kernel.org>
Sun, 1 May 2016 08:35:28 +0000 (09:35 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 1 May 2016 11:31:29 +0000 (12:31 +0100)
commit34ddef39cefc15ac6c82815c6339f5b666bb08d4
tree46ddc34f20270d5a52b0be3387c9599c2e7895a2
parent81a6fff4c5246c0604b065a6b34145cdad9be423
egl: android: add dma-buf fd support

Add support for creating images from Android native buffers with dma-buf
fd. As dma-buf support also requires DRI image loader extension, add
that as well.

This is based on several originally patches written by Varad Gautam.
I've collapsed them into logical changes and done a bit of reformatting.
Using dma-bufs vs. GEM handles is now a runtime decision similar to the
wayland EGL instead of being compile time selection. The dma-buf support
is also re-written to use common dri2_create_image_dma_buf function in
egl_dri2.c.

Cc: Varad Gautam <varadgautam@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/egl/drivers/dri2/platform_android.c