]> www.infradead.org Git - linux.git/commit
staging: media: ipu3: Stop streaming in inverse order of starting
authorMax Staudt <mstaudt@chromium.org>
Thu, 20 Jun 2024 14:45:43 +0000 (23:45 +0900)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 31 Aug 2024 07:40:42 +0000 (09:40 +0200)
commit5256cfec79d8c9a6a6075b317c5a46ef9ff0038f
treeac6bb6127f866830a553d926157655fc4967e13c
parentcf27c5a1bd7cc0b8df26044b08be3488dec129f8
staging: media: ipu3: Stop streaming in inverse order of starting

imgu_vb2_stop_streaming() did not order shutdown items in the inverse
order and count of what imgu_vb2_start_streaming() does. Consequently,
v6.7's new WARN_ON in call_s_stream() started screaming because it was
called multiple times on the entire pipe, yet it should only be called
when the pipe is interrupted by any first node being taken offline.

This reorders streamoff to be the inverse of streamon, and uses
analogous conditions to decide when and how often to call additional
teardown functions.

v4l2_subdev_call(s_stream, 0) remains outside the streaming_lock,
analogously to imgu_vb2_start_streaming().

Signed-off-by: Max Staudt <mstaudt@chromium.org>
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/staging/media/ipu3/ipu3-v4l2.c