linux/drivers/media/v4l2-core
Laurent Pinchart 805d4311a5 media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval
Due to a historical mishap, the v4l2_subdev_frame_interval structure
is the only part of the V4L2 subdev userspace API that doesn't contain a
'which' field. This prevents trying frame intervals using the subdev
'TRY' state mechanism.

Adding a 'which' field is simple as the structure has 8 reserved fields.
This would however break userspace as the field is currently set to 0,
corresponding to V4L2_SUBDEV_FORMAT_TRY, while the corresponding ioctls
currently operate on the 'ACTIVE' state. We thus need to add a new
subdev client cap, V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH, to
indicate that userspace is aware of this new field.

All drivers that implement the subdev .get_frame_interval() and
.set_frame_interval() operations are updated to return -EINVAL when
operating on the TRY state, preserving the current behaviour.

While at it, fix a bad copy&paste in the documentation of the struct
v4l2_subdev_frame_interval_enum 'which' field.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> # for imx-media
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for tegra-video
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13 16:52:35 +01:00
..
Kconfig media: remove the old videobuf framework 2023-09-27 09:40:01 +02:00
Makefile media: remove the old videobuf framework 2023-09-27 09:40:01 +02:00
tuner-core.c media: Switch i2c drivers back to use .probe() 2023-05-25 16:21:21 +02:00
v4l2-async.c media: v4l: async: Drop useless list move operation 2023-12-04 11:21:47 +01:00
v4l2-cci.c media: v4l2-cci: Add support for little-endian encoded registers 2023-12-13 13:21:19 +01:00
v4l2-common.c media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations 2023-12-13 16:52:35 +01:00
v4l2-compat-ioctl32.c media: core: Report the maximum possible number of buffers for the queue 2023-11-23 12:38:05 +01:00
v4l2-ctrls-api.c media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line 2023-02-09 09:22:45 +01:00
v4l2-ctrls-core.c media: AV1: Make sure that bit depth in correctly initialize 2023-06-09 16:13:38 +01:00
v4l2-ctrls-defs.c media: Add AV1 uAPI 2023-06-09 16:13:01 +01:00
v4l2-ctrls-priv.h
v4l2-ctrls-request.c
v4l2-dev.c media: v4l2-dev: Check that g/s_selection are valid before selecting crop 2023-11-23 13:02:40 +01:00
v4l2-device.c
v4l2-dv-timings.c
v4l2-event.c media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by 2023-10-07 10:55:45 +02:00
v4l2-fh.c
v4l2-flash-led-class.c
v4l2-fwnode.c media: v4l: fwnode: Parse MIPI DisCo for Imaging properties 2023-12-04 10:37:47 +01:00
v4l2-h264.c media: drivers/media/v4l2-core/v4l2-h264 : add detection of null pointers 2023-02-08 07:33:41 +01:00
v4l2-i2c.c
v4l2-ioctl.c media: core: v4l2-ioctl: check if ioctl is known to avoid NULL name 2023-11-23 13:01:32 +01:00
v4l2-jpeg.c media: v4l2-jpeg: ignore the unknown APP14 marker 2023-02-08 07:25:40 +01:00
v4l2-mc.c media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad() 2023-06-02 18:45:24 +01:00
v4l2-mem2mem.c media: v4l2: Allow M2M job queuing w/o streaming CAP queue 2023-11-16 13:25:52 +01:00
v4l2-spi.c
v4l2-subdev-priv.h media: v4l2-core: Make the v4l2-core code enable/disable the privacy LED if present 2023-02-03 10:22:34 +01:00
v4l2-subdev.c media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval 2023-12-13 16:52:35 +01:00
v4l2-trace.c
v4l2-vp9.c