linux-stable/drivers/media/common
Hans Verkuil b32431b753 media: vb2: refactor setting flags and caps, fix missing cap
Several functions implementing VIDIOC_REQBUFS and _CREATE_BUFS all use
almost the same code to fill in the flags and capability fields. Refactor
this into a new vb2_set_flags_and_caps() function that replaces the old
fill_buf_caps() and validate_memory_flags() functions.

This also fixes a bug where vb2_ioctl_create_bufs() would not set the
V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS cap and also not fill in the
max_num_buffers field.

Fixes: d055a76c00 ("media: core: Report the maximum possible number of buffers for the queue")
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Acked-by: Tomasz Figa <tfiga@chromium.org>
2024-01-24 17:27:51 +01:00
..
b2c2 media: b2c2: flexcop: Convert to SPDX identifier 2021-12-07 11:29:58 +01:00
saa7146 media: videobuf2: core: Rename min_buffers_needed field in vb2_queue 2023-12-13 17:31:27 +01:00
siano media: siano: Drop unnecessary error check for debugfs_create_dir/file() 2023-10-13 11:33:22 +02:00
v4l2-tpg treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
videobuf2 media: vb2: refactor setting flags and caps, fix missing cap 2024-01-24 17:27:51 +01:00
Kconfig media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
Makefile media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
cx2341x.c media: Rename stateful codec control macros 2020-12-03 12:27:32 +01:00
cypress_firmware.c
cypress_firmware.h
ttpci-eeprom.c media: move ttpci-eeprom to common 2021-06-02 11:16:15 +02:00
ttpci-eeprom.h media: move ttpci-eeprom to common 2021-06-02 11:16:15 +02:00
tveeprom.c
uvc.c usb: uvc: use v4l2_fill_fmtdesc instead of open coded format name 2023-01-31 09:40:43 +01:00