linux/include/media
Benjamin Gaignard 6662edcd32 media: videobuf2: Add min_reqbufs_allocation field to vb2_queue structure
Add 'min_reqbufs_allocation' field in the vb2_queue structure so drivers
can specify the minimum number of buffers to allocate when calling
VIDIOC_REQBUFS.
When initializing the queue, v4l2 core makes sure that the following
constraints are respected:
- the minimum number of buffers to allocate must be at least 2 because
one buffer is used by the hardware while the other is being processed
by userspace.
-if the driver needs 'min_queued_buffers' in the queue before calling
start_streaming(), then the minimum requirement is 'min_queued_buffers + 1'
to keep at least one buffer available for userspace.

Simplify __vb2_init_fileio() by using 'min_reqbufs_allocation' directly
to avoid duplicating the minimum number of buffers to allocate computation.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-03-25 12:00:44 +01:00
..
davinci media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection 2023-07-28 10:44:25 +02:00
drv-intf media: saa7146: convert to vb2 2023-04-15 08:53:31 +01:00
i2c media: i2c: add DS90UB960 driver 2023-07-14 13:18:56 +02:00
tpg media: v4l2-tpg: add HDMI Video Guard Band test pattern 2022-06-20 10:30:30 +01:00
cec-notifier.h
cec-pin.h
cec.h media: cec.h: Fix kerneldoc 2024-02-05 12:57:45 +01:00
demux.h
dmxdev.h media: dmxdev: drop unneeded <linux/kernel.h> inclusion from other headers 2021-12-14 16:19:04 +01:00
dvb-usb-ids.h media: dvb-usb: dib0700_devices: use an enum for the device number 2022-04-18 07:36:44 +02:00
dvb_ca_en50221.h
dvb_demux.h
dvb_frontend.h Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" 2023-06-14 23:16:29 +01:00
dvb_net.h media: dvb-core: Fix use-after-free due on race condition at dvb_net 2023-05-14 06:30:45 +01:00
dvb_ringbuffer.h media: dvb_ringbuffer: Fix typo in dvb_ringbuffer_pkt_write() kerneldoc 2022-11-25 09:45:47 +00:00
dvb_vb2.h
dvbdev.h media: dvbdev.h: do some kernel-doc cleanups 2023-05-14 16:05:27 +01:00
frame_vector.h media: videobuf2: revert "get_userptr: buffers are always writable" 2022-12-06 07:14:31 +00:00
imx.h
ipu-bridge.h media: ipu-bridge: increase sensor_name size 2023-09-27 10:47:22 +02:00
jpeg.h media: Add common header file with JPEG marker definitions 2023-05-25 16:21:21 +02:00
media-dev-allocator.h
media-device.h media: mc-device: remove unnecessary __must_check 2023-04-11 18:54:01 +02:00
media-devnode.h
media-entity.h media: mc: Add num_links flag to media_pad 2024-02-05 14:29:34 +01:00
media-request.h
mipi-csi2.h media: Add MIPI CSI-2 generic long packet type definition 2023-10-07 10:55:48 +02:00
rc-core.h media: rc-core: rename ir_raw_event_reset to ir_raw_event_overflow 2022-01-28 19:32:50 +01:00
rc-map.h media: rc: add Beelink Mini MXIII keymap 2023-03-19 22:21:54 +01:00
rcar-fcp.h
tuner-types.h
tuner.h Linux 5.15-rc4 2021-10-04 07:52:13 +02:00
tveeprom.h media: drop unnecessary networking includes 2023-03-19 22:50:06 +01:00
v4l2-async.h media: v4l: async: Set v4l2_device and subdev in async notifier init 2023-08-10 07:58:32 +02:00
v4l2-cci.h media: v4l2-cci: Add support for little-endian encoded registers 2023-12-13 13:21:19 +01:00
v4l2-common.h media updates for v6.9-rc1 2024-03-15 11:36:54 -07:00
v4l2-ctrls.h media: Add AV1 uAPI 2023-06-09 16:13:01 +01:00
v4l2-dev.h media: v4l2-dev.h: increase struct video_device name size 2023-09-27 10:47:22 +02:00
v4l2-device.h media: v4l2-device.h: drop V4L2_DEVICE_NAME_SIZE 2023-09-27 10:47:23 +02:00
v4l2-dv-timings.h
v4l2-event.h media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by 2023-10-07 10:55:45 +02:00
v4l2-fh.h
v4l2-flash-led-class.h
v4l2-fwnode.h media: v4l: fwnode: Remove unneeded forward declaration 2023-07-28 10:34:26 +02:00
v4l2-h264.h media: h264: Sort p/b reflist using frame_num 2022-05-17 10:02:29 +02:00
v4l2-image-sizes.h
v4l2-ioctl.h
v4l2-jpeg.h
v4l2-mc.h media: v4l2-mc: Make v4l2_pipeline_pm_{get,put} deprecated 2023-09-27 09:39:56 +02:00
v4l2-mediabus.h media: v4l2-mediabus: add support for dual edge sampling 2022-12-07 17:58:46 +01:00
v4l2-mem2mem.h media: v4l2-mem2mem.h: fix typo in comment 2023-11-23 13:03:01 +01:00
v4l2-rect.h
v4l2-subdev.h media: v4l2-subdev: Store frame interval in subdev state 2023-12-13 16:52:35 +01:00
v4l2-vp9.h media: Add VP9 v4l2 library 2021-11-22 07:47:13 +00:00
videobuf2-core.h media: videobuf2: Add min_reqbufs_allocation field to vb2_queue structure 2024-03-25 12:00:44 +01:00
videobuf2-dma-contig.h
videobuf2-dma-sg.h
videobuf2-dvb.h media: vb2: videobuf -> videobuf2 2022-08-29 15:38:09 +02:00
videobuf2-memops.h media: videobuf2: revert "get_userptr: buffers are always writable" 2022-12-06 07:14:31 +00:00
videobuf2-v4l2.h media: videobuf2: Remove vb2_find_timestamp() 2022-08-30 14:44:45 +02:00
videobuf2-vmalloc.h
vsp1.h media: vsp1: Add premultiplied alpha support 2022-09-07 23:48:39 +03:00