libimxdmabuffer
libimxdmabuffer copied to clipboard
DMABuff only works with root permissions?
I've tried to launch Qt-base application that uses qmlglsink not as root:
Aug 10 13:27:08 imx8mmevk run_neway_n111.sh[1654]: 0:00:07.644457131 1654 0xaaab07708a00 ERROR imxdmaheapallocator gstimxdmaheapallocator.c:252:gst_imx_dma_heap_allocator_activate:<imxdmaheapallocator0> could not create dma-heap allocator: Permission denied (13)
Aug 10 13:27:08 imx8mmevk run_neway_n111.sh[1654]: 0:00:07.644589505 1654 0xaaab07708a00 ERROR imxdmabufallocator gstimxdmabufallocator.c:279:gst_imx_dmabuf_allocator_activate:<imxdmaheapallocator0> could not activate i.MX DMA-BUF allocator
Aug 10 13:27:08 imx8mmevk run_neway_n111.sh[1654]: MyApp: ../imxdmabuffer/imxdmabuffer.c:84: imx_dma_buffer_deallocate: Assertion `buffer != NULL' failed.
I had to add user to video group to access fb0 at first, but it seems I need more permissions to utilize DMABuff on this imx8mm device..?
Or is it impossible to use this feature at all not running root?
What are the permissions of /dev/dma_heap/linux,cma-uncached (or /dev/dma_heap/linux,cma if you have that instead)?
# ls -l /dev/dma_heap/
total 0
crw------- 1 root root 250, 1 Aug 11 05:12 linux,cma
crw------- 1 root root 250, 0 Aug 11 05:12 system