linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFCv4 PATCH 00/15] vb2: improve dma-sg, expbuf
@ 2014-10-23 11:21 Hans Verkuil
  2014-10-23 11:21 ` [RFCv4 PATCH 01/15] videobuf2-core.h: improve documentation Hans Verkuil
                   ` (14 more replies)
  0 siblings, 15 replies; 17+ messages in thread
From: Hans Verkuil @ 2014-10-23 11:21 UTC (permalink / raw)
  To: linux-media; +Cc: pawel, m.szyprowski, laurent.pinchart

Changes since v3:

- Dropped patch 02/10: succeeded by patch 10/15 in this series
- Added patches 11-15 to correctly handle syncing/mapping dmabuf
  buffers for CPU access. This was never done correctly before.
  Many thanks to Pawel Osciak for helping me with this during the
  media mini-summit last week.

The patch series adds an allocation context to dma-sg and uses that to move
dma_(un)map_sg into the vb2 framework, which is where it belongs.

Some drivers needs to fixup the buffers before giving it back to userspace
(or before handing it over to the kernel). Document that this can be done
in buf_prepare and buf_finish.

The last 5 patches make this more strict by requiring all cpu access to
be bracketed by calls to vb2_plane_begin/end_cpu_access() which replaces
the old vb2_plane_vaddr() call.

Note: two drivers still use the vb2_plane_addr() call: coda and
exynos4-is/fimc-capture.c. For both drivers I will need some help since
I am not sure where to put the begin/end calls. Patch 14 removes
the vb2_plane_vaddr call, so obviously those two drivers won't compile
after that.

DMABUF export support is added to dma-sg and vmalloc, so now all memory
models support DMABUF importing and exporting.

I am inclined to make a pull request for patches 1-10 if there are no
new comments. The issues that patches 11-15 address are separate from
the patches 1-10 and this is only an issue when using dmabuf with
drivers that need cpu access.

Reviews are very welcome.

I plan on doing more testing next week, in particular with the patch
series posted for vivid that add dma-contig. It's now easy to extend
with dma-sg as well, so that should make testing a lot simpler.

Regards,

	Hans


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-10-27  0:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 11:21 [RFCv4 PATCH 00/15] vb2: improve dma-sg, expbuf Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 01/15] videobuf2-core.h: improve documentation Hans Verkuil
2014-10-27  0:07   ` Laurent Pinchart
2014-10-23 11:21 ` [RFCv4 PATCH 02/15] vb2-dma-sg: add allocation context to dma-sg Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 03/15] vb2-dma-sg: move dma_(un)map_sg here Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 04/15] vb2-dma-sg: add dmabuf import support Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 05/15] vb2-dma-sg: add get_dmabuf Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 06/15] vb2-vmalloc: add get_dmabuf support Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 07/15] vb2: replace 'write' by 'dma_dir' Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 08/15] vivid: enable vb2_expbuf support Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 09/15] mem2mem_testdev: support expbuf Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 10/15] vb2: use dma_map_sg_attrs to prevent unnecessary sync Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 11/15] vb2: add begin/end_cpu_access functions Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 12/15] videobuf2-dvb.c: convert to vb2_plane_begin_cpu_access() Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 13/15] v4l: convert vb2_plane_vaddr to vb2_plane_begin_cpu_access Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 14/15] vb2: drop the unused vb2_plane_vaddr function Hans Verkuil
2014-10-23 11:21 ` [RFCv4 PATCH 15/15] vb2: update the buf_prepare/finish documentation Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).