This series supersedes these older RFC patches: https://patchwork.linuxtv.org/project/linux-media/patch/6b303108-6ab6-43c9-9c7b-7776ef64fb06@xxxxxxxxx/ https://patchwork.linuxtv.org/project/linux-media/list/?series=13889 https://patchwork.linuxtv.org/project/linux-media/patch/bba26f7c-2a36-4e93-b292-59484dd2ed98@xxxxxxxxx/ The first two patches add support for reporting min_num_buffers and rec_num_buffers. The third patch renames the vb2_queue field min_reqbufs_allocation to rec_num_buffers, which makes much more sense as a name, and syncs up nicely with the new v4l2_createbuffers field. The next patch adds support for a queue_info op to replace the existing queue_setup op, and the last patch implements that for vivid. As you can see, the new op is a lot easier to use, and it also prevents drivers from messing with the buffer count. Instead they can just set rec_num_buffers according to what they need. If these changes are accepted (esp. the first two patches), then the next step will be to go through all drivers that fiddle with the count value in queue_setup. Ideally I'd like to replace queue_setup by queue_info as well, but that's an optional step and depends one whether the queue_info proposal is accepted. Regards, Hans Hans Verkuil (5): media: vb2: add support for min/rec_num_buffers Documentation: media: document min/rec_num_buffers media: vb2: rename min_reqbufs_allocation to rec_num_buffers media: vb2: introduce queue_info to replace queue_setup media: vivid: convert queue_setup to queue_info .../media/v4l/vidioc-create-bufs.rst | 34 +++++-- .../media/v4l/vidioc-reqbufs.rst | 6 ++ .../media/common/videobuf2/videobuf2-core.c | 96 +++++++++++++------ .../media/common/videobuf2/videobuf2-v4l2.c | 19 +++- .../media/test-drivers/vicodec/vicodec-core.c | 4 +- .../media/test-drivers/vimc/vimc-capture.c | 2 +- drivers/media/test-drivers/vivid/vivid-core.c | 4 +- .../media/test-drivers/vivid/vivid-meta-cap.c | 17 +--- .../media/test-drivers/vivid/vivid-meta-out.c | 27 ++---- .../media/test-drivers/vivid/vivid-sdr-cap.c | 16 ++-- .../test-drivers/vivid/vivid-touch-cap.c | 18 +--- .../media/test-drivers/vivid/vivid-vbi-cap.c | 13 +-- .../media/test-drivers/vivid/vivid-vbi-out.c | 13 +-- .../media/test-drivers/vivid/vivid-vid-cap.c | 39 +++----- .../media/test-drivers/vivid/vivid-vid-out.c | 37 ++----- include/media/videobuf2-core.h | 22 ++++- include/uapi/linux/videodev2.h | 20 +++- 17 files changed, 208 insertions(+), 179 deletions(-) -- 2.45.2