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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux