Re: [PATCH v3 03/12] intel-ipu3: Add DMA API implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arnd,

On Wed, Jul 19, 2017 at 09:24:41AM +0200, Arnd Bergmann wrote:
> On Wed, Jul 19, 2017 at 5:12 AM, Yong Zhi <yong.zhi@xxxxxxxxx> wrote:
> > From: Tomasz Figa <tfiga@xxxxxxxxxxxx>
> >
> > This patch adds support for the IPU3 DMA mapping API.
> >
> > Signed-off-by: Tomasz Figa <tfiga@xxxxxxxxxxxx>
> > Signed-off-by: Yong Zhi <yong.zhi@xxxxxxxxx>
> 
> This needs some explanation on why you decided to go down the
> route of adding your own dma_map_ops. It's not obvious at all,
> and and I'm still concerned that this complicates things more than
> it helps.

There are a few considerations here --- they could be documented in the
patch commit message

- The device has its own MMU. The default x86 DMA ops assume there isn't.

- As this is an image signal processor device, the buffers are typically
  large (often in the range of tens of MB) and they do not need to be
  physically contiguous. The current implementation of e.g.
  drivers/iommu/intel-iommu.c allocate memory using alloc_pages() which is
  unfeasible for such single allocations. Neither CMA is needed.

  Also other IOMMU implementations have their own DMA ops currently.

I agree it'd be nice to unify these in the long run but I don't think this
stands apart from the rest currently --- except that the MMU is only used
by a single PCI device, the same which it is contained in.

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux