we would like to use the hardware decoder of the imx8 to decode a h264 stream with a resolution of 1920x1080 using the v4l2h264dec gstreamer element. Until recently the decoder was working fine.
We want to switch to a new bsp with linux-toradex-4.14-2.3.x. With the new bsp the decoder only works for streams with a resolution less than 800x800 pixel, for 1920x1080 we get:
[ 271.751897] [VPU Decoder] firmware version is 1.5.6 [ 271.815314] vpu-b0 2c000000.vpu_decoder: dma_alloc_coherent of size 3145728 failed [ 271.825432] [VPU Decoder] error: alloc_dma_buffer() dma buffer alloc size(120000) fail! [ 271.825454] [VPU Decoder] error: alloc mbi buffer
Gstreamer and plugin version is 1.14.4, decoder firmware version 1.5.6 in both old and new bsp. We have noticed that the output of “cat /proc/meminfo | grep Cma” changed. It was
CmaTotal: 983040 kB CmaFree: 712392 kB
in the old bsp with linux-toradex_4.14-2.0.x, now it is
CmaTotal: 327680 kB CmaFree: 57420 kB
in idle state. I am not aware of any explicit changes we did to the memory.
Are we correct with the assumption that the allocation problem is related to the difference in cma memory? If yes, how can we enlarge the cma memory in yocto?