Re: [RFC PATCH] lib: scatterlist: add sg splitting function

2015-07-30 Thread Robert Jarzmik
Russell King - ARM Linux writes: > On Thu, Jul 30, 2015 at 09:02:15PM +0200, Robert Jarzmik wrote: > Hmm. > > What happens if... > > n = dma_map_sg(dev, sg, nents, dir); > > where n < nents (which can happen if you have an IOMMU and it coalesces > the entries)? That's something I have not t

Re: [RFC PATCH] lib: scatterlist: add sg splitting function

2015-07-30 Thread Russell King - ARM Linux
On Thu, Jul 30, 2015 at 09:02:15PM +0200, Robert Jarzmik wrote: > Sometimes a scatter-gather has to be split into several chunks, or sub scatter > lists. This happens for example if a scatter list will be handled by multiple > DMA channels, each one filling a part of it. > > A concrete example com

[RFC PATCH] lib: scatterlist: add sg splitting function

2015-07-30 Thread Robert Jarzmik
Sometimes a scatter-gather has to be split into several chunks, or sub scatter lists. This happens for example if a scatter list will be handled by multiple DMA channels, each one filling a part of it. A concrete example comes with the media V4L2 API, where the scatter list is allocated from users