[lkml]   [2018]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/2] media: usb: pwc: Don't use coherent DMA buffers for ISO transfer
On Mon, 23 Jul 2018, Matwey V. Kornilov wrote:

> I've tried to strategies:
> 1) Use dma_unmap and dma_map inside the handler (I suppose this is
> similar to how USB core does when there is no URB_NO_TRANSFER_DMA_MAP)


> 2) Use sync_cpu and sync_device inside the handler (and dma_map only
> once at memory allocation)
> It is interesting that dma_unmap/dma_map pair leads to the lower
> overhead (+1us) than sync_cpu/sync_device (+2us) at x86_64 platform.
> At armv7l platform using dma_unmap/dma_map leads to ~50 usec in the
> handler, and sync_cpu/sync_device - ~65 usec.
> However, I am not sure is it mandatory to call
> dma_sync_single_for_device for FROM_DEVICE direction?

According to Documentation/DMA-API-HOWTO.txt, the CPU should not write
to a DMA_FROM_DEVICE-mapped area, so dma_sync_single_for_device() is
not needed.

Alan Stern

 \ /
  Last update: 2018-07-23 20:58    [W:0.148 / U:27.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site