yuq / mesa-lima

Deprecated, new place: https://gitlab.freedesktop.org/lima
https://github.com/yuq/mesa-lima/wiki
165 stars 17 forks source link

lima: support exporting dma_buf #5

Closed enunes closed 6 years ago

enunes commented 6 years ago

This enables lima to export a shared buffer from a dma_buf handle using the DRM prime infrastructure. With this, it is possible to export a gbm_bo allocated with lima to the display driver for rendering to a display.

This was tested on the Allwinner A20 with the sun4i-drm driver, along with lima.

Signed-off-by: Erico Nunes nunes.erico@gmail.com

enunes commented 6 years ago

Updated it to call drmPrimeHandleToFD first and return in case of error.