Skip to content

RFC v4l: DMA buffer sharing support as a user

Sumit Semwal linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 40 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4v4l: Add DMABUF as a memory typeinclude/linux/videodev2.h+8 -00 replies
2/4v4l:vb2: add support for shared buffer (dma_buf)drivers/media/video/videobuf2-core.c include/media/videobuf2-core.h+215 -139 replies
3/4v4l:vb: remove warnings about MEMORY_DMABUFdrivers/media/video/videobuf-core.c+4 -00 replies
4/4v4l:vb2: Add dma-contig allocator as dma_buf userdrivers/media/video/videobuf2-dma-contig.c+125 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFCv1 0/4] v4l: DMA buffer sharing support as a user

Hello Everyone,

A very happy new year 2012! :)

This patchset is an RFC for the way videobuf2 can be adapted to add support for DMA buffer sharing framework[1].

The original patch-set for the idea, and PoC of buffer sharing was by Tomasz Stanislawski <[email protected]>, who demonstrated buffer sharing between two v4l2 devices[2]. This RFC is needed to adapt these patches to the changes that have happened in the DMA buffer sharing framework over past few months.

To begin with, I have tried to adapt only the dma-contig allocator, and only as a user of dma-buf buffer. I am currently working on the v4l2-as-an-exporter changes, and will share as soon as I get it in some shape.

As with the PoC [2], the handle for sharing buffers is a file-descriptor (fd). The usage documentation is also a part of [1].

So, the current RFC has the following limitations:
- Only buffer sharing as a buffer user,
- doesn't handle cases where even for a contiguous buffer, the sg_table can have more than one scatterlist entry.

Thanks and best regards,
~Sumit.

[1]: dma-buf patchset at: https://lkml.org/lkml/2011/12/26/29
[2]: http://lwn.net/Articles/454389

Sumit Semwal (4):
v4l: Add DMABUF as a memory type
v4l:vb2: add support for shared buffer (dma_buf) v4l:vb: remove warnings about MEMORY_DMABUF v4l:vb2: Add dma-contig allocator as dma_buf user

 drivers/media/video/videobuf-core.c        |    4 +
 drivers/media/video/videobuf2-core.c       |  186 +++++++++++++++++++++++++++-
 drivers/media/video/videobuf2-dma-contig.c |  125 +++++++++++++++++++
 include/linux/videodev2.h                  |    8 ++
 include/media/videobuf2-core.h             |   30 +++++
 5 files changed, 352 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.5.4