Re: Enabling ION with CMA heap on imx6

Otavio Salvador

Hello Carlos,

Em ter., 20 de out. de 2020 às 05:19, Carlos Rafael Giani via <>
On i.MX6 machines, it is currently not possible to use the ION
allocator. However, there is no hardware limitation that requires ION to
be disabled.

If ION were enabled, with a CMA heap, then it would be possible for
userspace to allocate DMA-BUF buffers. I could then enable the ion
packageconfig in the libimxdmabuffer recipe.

The defconfig only needs these additions:


I tried it out, worked fine.

Using DMA-BUF for allocating physically contiguous memory (via CMA) is
preferable over using other allocators (like the ones from the VPU, IPU
etc.) since it allows for proper buffer sharing, ownership transfer, is
based on FDs (though physical address are accessible via an NXP
extension), and there are extensions in OpenCL, OpenGL etc. for
importing DMA-BUF. V4L2 also has DMA-BUF support.

Please prepare the PR for it; also see if i.MX8 couldn't also benefit from it.

Otavio Salvador O.S. Systems
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750

Join { to automatically receive all group messages.