lkml.org 
[lkml]   [2009]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: How to efficiently handle DMA and cache on ARMv7 ? (was "Is get_user_pages() enough to prevent pages from being swapped out ?")
Date
On Thursday 06 August 2009 20:46:14 David Xiao wrote:

[snip]

> Another approach is working from a different direction: the kernel
> allocates the non-cached buffer and then mmap() into user space. I have
> done that in similar situation to try to achieve "zero-copy".

That's what most drivers do. While it's probably the easiest solution in many
cases, it will sometimes introduce additional memcpy() operations that I'd
like to avoid.

Think about the simple following use case. An application wants to display
video it acquires from the device to the screen using Xv. The video buffer is
allocated by Xv. Using the v4l2 user pointer streaming method, the device can
DMA directly to the Xv buffer. Using driver-allocated buffers, a memcpy() is
required between the v4l2 buffer and the Xv buffer.

Regards,

Laurent Pinchart



\
 
 \ /
  Last update: 2009-08-07 09:31    [W:0.243 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site