diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-09-18 14:48:38 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-27 09:39:57 +0200 |
commit | 009905ec50433259c05f474251000b040098564e (patch) | |
tree | 8ed63e6498fda63971982fd024c24ed84264ba85 /include | |
parent | media: ov13b10: Add 1364x768 register settings (diff) | |
download | linux-009905ec50433259c05f474251000b040098564e.tar.xz linux-009905ec50433259c05f474251000b040098564e.zip |
media: v4l2-subdev: Document and enforce .s_stream() requirements
The subdev .s_stream() operation must not be called to start an already
started subdev, or stop an already stopped one. This requirement has
never been formally documented. Fix it, and catch possible offenders
with a WARN_ON() in the call_s_stream() wrapper.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/v4l2-subdev.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 820e38ec3dc9..5f59ff0796b7 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -446,7 +446,9 @@ enum v4l2_subdev_pre_streamon_flags { * @s_stream: start (enabled == 1) or stop (enabled == 0) streaming on the * sub-device. Failure on stop will remove any resources acquired in * streaming start, while the error code is still returned by the driver. - * Also see call_s_stream wrapper in v4l2-subdev.c. + * The caller shall track the subdev state, and shall not start or stop an + * already started or stopped subdev. Also see call_s_stream wrapper in + * v4l2-subdev.c. * * @g_pixelaspect: callback to return the pixelaspect ratio. * |