summaryrefslogtreecommitdiff
path: root/drivers/media/platform/rockchip
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2024-01-19 12:03:23 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-01-24 19:27:51 +0300
commitb32431b753217d8d45b018443b1a7aac215921fb (patch)
treec8d8b787fbe5c209efa15dbe57c626bb9b01696a /drivers/media/platform/rockchip
parent78e23c3e914a5e678a20286fb09bc218017af89a (diff)
downloadlinux-b32431b753217d8d45b018443b1a7aac215921fb.tar.xz
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: d055a76c0065 ("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>
Diffstat (limited to 'drivers/media/platform/rockchip')
0 files changed, 0 insertions, 0 deletions