linux/drivers/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
..
cec media: platform: cros-ec: Add Dita to the match table 2024-02-16 11:46:32 +01:00
common media: videobuf2: Add min_reqbufs_allocation field to vb2_queue structure 2024-03-25 12:00:44 +01:00
dvb-core media: dvb_frontend: Use wait_event_freezable_timeout() for freezable kthread 2024-02-16 11:46:31 +01:00
dvb-frontends media updates for v6.9-rc1 2024-03-15 11:36:54 -07:00
firewire media: firewire: firedtv-avc.c: replace BUG with proper, error return 2023-08-10 07:58:37 +02:00
i2c media updates for v6.9-rc1 2024-03-15 11:36:54 -07:00
mc media: mc: Expand MUST_CONNECT flag to always require an enabled link 2024-02-05 14:29:34 +01:00
mmc
pci media updates for v6.9-rc1 2024-03-15 11:36:54 -07:00
platform media: c8sectpfe: Remove unused of_gpio.h 2024-03-25 10:13:43 +01:00
radio media: radio-si476x: don't fill in bus_info 2023-09-27 10:47:23 +02:00
rc media: imon: Convert sprintf/snprintf to sysfs_emit 2024-03-25 10:13:44 +01:00
spi
test-drivers media updates for v6.9-rc1 2024-03-15 11:36:54 -07:00
tuners media: tda18271: remove redundant assignment to variable bcal 2024-02-16 11:46:32 +01:00
usb media updates for v6.9-rc1 2024-03-15 11:36:54 -07:00
v4l2-core media updates for v6.9-rc1 2024-03-15 11:36:54 -07:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile