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 26 repliesIn 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 -92 replies
2/11vb2: Move buffer cache synchronisation to prepare from queuedrivers/media/v4l2-core/videobuf2-core.c+11 -71 reply
3/11vb2: Move cache synchronisation from buffer done to dqbuf handlerdrivers/media/v4l2-core/videobuf2-core.c+10 -103 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 -184 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 -155 replies
6/11vb2: Improve struct vb2_mem_ops documentation; alloc and put are for MMAPinclude/media/videobuf2-core.h+10 -102 replies
7/11vb2: dma-contig: Remove redundant sgt_base fielddrivers/media/v4l2-core/videobuf2-dma-contig.c+10 -114 replies
8/11vb2: dma-contig: Move vb2_dc_get_base_sgt() updrivers/media/v4l2-core/videobuf2-dma-contig.c+22 -221 reply
9/11vb2: dma-contig: Don't warn on failure in obtaining scatterlistdrivers/media/v4l2-core/videobuf2-dma-contig.c+2 -41 reply
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 -281 reply
11/11vb2: dma-contig: Add WARN_ON_ONCE() to check for potential bugsdrivers/media/v4l2-core/videobuf2-dma-contig.c+6 -02 replies

Reviews trailers per patch

5 of 11 patches have a Reviewed-by or Acked-by.

PatchHans VerkuilLaurent Pinchart
1/11A-b R-b
2/11
3/11
4/11A-b
5/11
6/11A-b R-b
7/11
8/11R-b
9/11R-b
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC RESEND 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