Skip to content

RFC vb2: Handle user cache hints, allow drivers to choose cache coherency

Sakari Ailus linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11vb2: Rename confusingly named internal buffer preparation functionsdrivers/media/v4l2-core/videobuf2-core.c+10 -90 replies
2/11vb2: Move buffer cache synchronisation to prepare from queuedrivers/media/v4l2-core/videobuf2-core.c+11 -70 replies
3/11vb2: Move cache synchronisation from buffer done to dqbuf handlerdrivers/media/v4l2-core/videobuf2-core.c+10 -100 replies
4/11v4l: Unify cache management hint buffer flagsDocumentation/DocBook/media/v4l/io.xml include/trace/events/v4l2.h include/uapi/linux/videodev2.h+17 -180 replies
5/11v4l2-core: Don't sync cache for a buffer if so requesteddrivers/media/v4l2-core/videobuf2-core.c include/media/videobuf2-core.h+49 -150 replies
6/11vb2: Improve struct vb2_mem_ops documentation; alloc and put are for MMAPinclude/media/videobuf2-core.h+10 -100 replies
7/11vb2: dma-contig: Remove redundant sgt_base fielddrivers/media/v4l2-core/videobuf2-dma-contig.c+10 -110 replies
8/11vb2: dma-contig: Move vb2_dc_get_base_sgt() updrivers/media/v4l2-core/videobuf2-dma-contig.c+22 -220 replies
9/11vb2: dma-contig: Don't warn on failure in obtaining scatterlistdrivers/media/v4l2-core/videobuf2-dma-contig.c+2 -40 replies
10/11vb2: dma-contig: Let drivers decide DMA attrs of MMAP and USERPTR bufsdrivers/media/v4l2-core/videobuf2-dma-contig.c include/media/videobuf2-dma-contig.h+79 -280 replies
11/11vb2: dma-contig: Add WARN_ON_ONCE() to check for potential bugsdrivers/media/v4l2-core/videobuf2-dma-contig.c+6 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC 00/11] vb2: Handle user cache hints, allow drivers to choose cache coherency

Hi folks,

This RFC patchset achieves two main objectives:

1. Respects cache flags passed from the user space. As no driver nor videobuf2 has (ever?) implemented them, the two flags are replaced by a single one (V4L2_BUF_FLAG_NO_CACHE_SYNC) and the two old flags are deprecated. This is done since a single flag provides the driver with enough information on what to do. (See more info in patch 4.)

2. Allows a driver using videobuf2 dma-contig memory type to choose whether it prefers coherent or non-coherent CPU access to buffer memory for MMAP and USERPTR buffers. This could be later extended to be specified by the user, and per buffer if needed.

Only dma-contig memory type is changed but the same could be done to dma-sg as well. I can add it to the set if people are happy with the changes to dma-contig.

Signature · 2 lines
Kind regards,
Sakari