-
- Downloads
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>
Showing
- Documentation/userspace-api/media/v4l/vidioc-subdev-g-client-cap.rst 5 additions, 0 deletions...on/userspace-api/media/v4l/vidioc-subdev-g-client-cap.rst
- Documentation/userspace-api/media/v4l/vidioc-subdev-g-frame-interval.rst 11 additions, 6 deletions...serspace-api/media/v4l/vidioc-subdev-g-frame-interval.rst
- drivers/media/i2c/adv7180.c 7 additions, 0 deletionsdrivers/media/i2c/adv7180.c
- drivers/media/i2c/alvium-csi2.c 14 additions, 0 deletionsdrivers/media/i2c/alvium-csi2.c
- drivers/media/i2c/et8ek8/et8ek8_driver.c 14 additions, 0 deletionsdrivers/media/i2c/et8ek8/et8ek8_driver.c
- drivers/media/i2c/imx214.c 7 additions, 0 deletionsdrivers/media/i2c/imx214.c
- drivers/media/i2c/imx274.c 14 additions, 0 deletionsdrivers/media/i2c/imx274.c
- drivers/media/i2c/max9286.c 14 additions, 0 deletionsdrivers/media/i2c/max9286.c
- drivers/media/i2c/mt9m111.c 14 additions, 0 deletionsdrivers/media/i2c/mt9m111.c
- drivers/media/i2c/mt9m114.c 14 additions, 0 deletionsdrivers/media/i2c/mt9m114.c
- drivers/media/i2c/mt9v011.c 14 additions, 0 deletionsdrivers/media/i2c/mt9v011.c
- drivers/media/i2c/mt9v111.c 14 additions, 0 deletionsdrivers/media/i2c/mt9v111.c
- drivers/media/i2c/ov2680.c 7 additions, 0 deletionsdrivers/media/i2c/ov2680.c
- drivers/media/i2c/ov5640.c 14 additions, 0 deletionsdrivers/media/i2c/ov5640.c
- drivers/media/i2c/ov5648.c 7 additions, 0 deletionsdrivers/media/i2c/ov5648.c
- drivers/media/i2c/ov5693.c 7 additions, 0 deletionsdrivers/media/i2c/ov5693.c
- drivers/media/i2c/ov6650.c 14 additions, 0 deletionsdrivers/media/i2c/ov6650.c
- drivers/media/i2c/ov7251.c 14 additions, 0 deletionsdrivers/media/i2c/ov7251.c
- drivers/media/i2c/ov7670.c 12 additions, 0 deletionsdrivers/media/i2c/ov7670.c
- drivers/media/i2c/ov772x.c 14 additions, 0 deletionsdrivers/media/i2c/ov772x.c
Loading
Please register or sign in to comment