st/va: add support to export a surface as dmabuf
authorJulien Isorce <j.isorce@samsung.com>
Fri, 30 Oct 2015 11:42:53 +0000 (11:42 +0000)
committerChristian König <christian.koenig@amd.com>
Fri, 30 Oct 2015 12:21:20 +0000 (13:21 +0100)
commite7ed3963ed33134cc214f0a8b8e4b8cb6029887d
tree52f0c6ff2de8ce0d065b8c7206b6e6bf60dfd742
parent802ba6f8655bf967299b027204ecdd5855050609
st/va: add support to export a surface as dmabuf

I.e. implements:
VaAcquireBufferHandle
VaReleaseBufferHandle
for memory of type VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME

And apply relatives change to:
vlVaMapBuffer
vlVaUnMapBuffer
vlVaDestroyBuffer

Implementation inspired from cgit.freedesktop.org/vaapi/intel-driver

Tested with gstreamer-vaapi with nouveau driver.

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/buffer.c
src/gallium/state_trackers/va/context.c
src/gallium/state_trackers/va/va_private.h