• Magnus Damm's avatar
    videobuf-dma-contig: zero copy USERPTR support · 720b17e7
    Magnus Damm authored
    Since videobuf-dma-contig is designed to handle physically contiguous
    memory, this patch modifies the videobuf-dma-contig code to only accept a
    user space pointer to physically contiguous memory.  For now only
    VM_PFNMAP vmas are supported, so forget hotplug.
    
    On SuperH Mobile we use this with our sh_mobile_ceu_camera driver together
    with various multimedia accelerator blocks that are exported to user space
    using UIO.  The UIO kernel code exports physically contiguous memory to
    user space and lets the user space application mmap() this memory and pass
    a pointer using the USERPTR interface for V4L2 zero copy operation.
    
    With this approach we support zero copy capture, hardware scaling and
    various forms of hardware encoding and decoding.
    
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Paul Mundt <lethal@linux-sh.org>
    Acked-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
    Cc: Hans Verkuil <hverkuil@xs4all.nl>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    720b17e7
videobuf-dma-contig.c 12 KB