Re: [PATCHv10 08/26] v4l: vb2-dma-contig: add support for scatterlist in userptr mode

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

 



Hello,

On 10/26/2012 6:24 PM, Pawel Osciak wrote:
Hi Tomasz,

On Wed, Oct 10, 2012 at 7:46 AM, Tomasz Stanislawski
<t.stanislaws@xxxxxxxxxxx> wrote:
This patch introduces usage of dma_map_sg to map memory behind
a userspace pointer to a device as dma-contiguous mapping.


Perhaps I'm missing something, but I don't understand the purpose of
this patch. If the device can do DMA SG, why use videobuf2-dma-contig
and not videobuf2-dma-sg?

This patch is for devices which doesn't do DMA SG, but might be behind IOMMU. In such case one can call dma_map_sg() with scatterlist of individual pages gathered from user pointer (anonymous memory of the process) which in turn will be mapped into contiguous dma adress space (dma_map_sg() returns only one chunk in such case). This is not very intuitive, but it was best way to fit such case into existing dma-mapping design.

What would be the difference design-wise
between them if this patch is merged?

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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