mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
media: nxp: imx8-isi: Drop mxc_isi_video.is_streaming field
The mxc_isi_video.is_streaming field is used to track the streaming status of the video device. The same information is also tracked by the videobuf2 queue. Drop the is_streaming field, and check the queue streaming status instead. Link: https://lore.kernel.org/r/20250813212451.22140-3-laurent.pinchart@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Richard Leitner <richard.leitner@linux.dev> # i.MX8MP Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
47773031a1
commit
15b5936343
|
|
@ -202,9 +202,8 @@ struct mxc_isi_video {
|
|||
struct video_device vdev;
|
||||
struct media_pad pad;
|
||||
|
||||
/* Protects is_streaming, and the vdev and vb2_q operations */
|
||||
/* Protects the vdev and vb2_q operations */
|
||||
struct mutex lock;
|
||||
bool is_streaming;
|
||||
|
||||
struct v4l2_pix_format_mplane pix;
|
||||
const struct mxc_isi_format_info *fmtinfo;
|
||||
|
|
|
|||
|
|
@ -969,8 +969,6 @@ static int mxc_isi_vb2_prepare_streaming(struct vb2_queue *q)
|
|||
if (ret)
|
||||
goto err_stop;
|
||||
|
||||
video->is_streaming = true;
|
||||
|
||||
return 0;
|
||||
|
||||
err_stop:
|
||||
|
|
@ -1035,8 +1033,6 @@ static void mxc_isi_vb2_unprepare_streaming(struct vb2_queue *q)
|
|||
mxc_isi_video_free_discard_buffers(video);
|
||||
video_device_pipeline_stop(&video->vdev);
|
||||
mxc_isi_pipe_release(video->pipe);
|
||||
|
||||
video->is_streaming = false;
|
||||
}
|
||||
|
||||
static const struct vb2_ops mxc_isi_vb2_qops = {
|
||||
|
|
@ -1317,7 +1313,7 @@ void mxc_isi_video_suspend(struct mxc_isi_pipe *pipe)
|
|||
{
|
||||
struct mxc_isi_video *video = &pipe->video;
|
||||
|
||||
if (!video->is_streaming)
|
||||
if (!vb2_is_streaming(&video->vb2_q))
|
||||
return;
|
||||
|
||||
mxc_isi_pipe_disable(pipe);
|
||||
|
|
@ -1348,7 +1344,7 @@ int mxc_isi_video_resume(struct mxc_isi_pipe *pipe)
|
|||
{
|
||||
struct mxc_isi_video *video = &pipe->video;
|
||||
|
||||
if (!video->is_streaming)
|
||||
if (!vb2_is_streaming(&video->vb2_q))
|
||||
return 0;
|
||||
|
||||
mxc_isi_video_init_channel(video);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user