Questions regarding DMA buffer sharing using IOMMU

Arnd Bergmann arnd at
Mon May 12 05:00:57 PDT 2014

On Monday 12 May 2014 15:12:41 Pintu Kumar wrote:
> Hi, 
> I have some queries regarding IOMMU and CMA buffer sharing. 
> We have an embedded linux device (kernel 3.10, RAM: 256Mb) in 
> which camera and codec supports IOMMU but the display does not support IOMMU. 
> Thus for camera capture we are using iommu buffers using
> ION/DMABUF. But for all display rendering we are using CMA buffers. 
> So, the question is how to achieve buffer sharing (zero-copy)
> between Camera and Display using only IOMMU? 
> Currently we are achieving zero-copy using CMA. And we are
> exploring options to use IOMMU. 
> Now we wanted to know which option is better? To use IOMMU or CMA? 
> If anybody have come across these design please share your thoughts and results. 

There is a slight performance overhead in using the IOMMU in general,
because the IOMMU has to fetch the page table entries from memory
at least some of the time.

If that overhead is within the constraints you have for transfers between
camera and codec, you are always better off using IOMMU since that
means you don't have to do memory migration.

Note however, that we don't have a way to describe IOMMU relations
to devices in DT, so whatever you come up with to do this will most
likely be incompatible with what we do in future kernel versions.


More information about the linux-arm-kernel mailing list