Commit 7a9e7bd3 authored by Kieran Bingham's avatar Kieran Bingham Committed by Mauro Carvalho Chehab

[media] v4l: vsp1: Ensure pipeline locking in resume path

The vsp1_pipeline_ready() and vsp1_pipeline_run() functions must be
called with the pipeline lock held, fix the resume code path.
Signed-off-by: default avatarKieran Bingham <kieran+renesas@bingham.xyz>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 34e77ed8
...@@ -365,6 +365,7 @@ void vsp1_pipelines_suspend(struct vsp1_device *vsp1) ...@@ -365,6 +365,7 @@ void vsp1_pipelines_suspend(struct vsp1_device *vsp1)
void vsp1_pipelines_resume(struct vsp1_device *vsp1) void vsp1_pipelines_resume(struct vsp1_device *vsp1)
{ {
unsigned long flags;
unsigned int i; unsigned int i;
/* Resume all running pipelines. */ /* Resume all running pipelines. */
...@@ -379,7 +380,9 @@ void vsp1_pipelines_resume(struct vsp1_device *vsp1) ...@@ -379,7 +380,9 @@ void vsp1_pipelines_resume(struct vsp1_device *vsp1)
if (pipe == NULL) if (pipe == NULL)
continue; continue;
spin_lock_irqsave(&pipe->irqlock, flags);
if (vsp1_pipeline_ready(pipe)) if (vsp1_pipeline_ready(pipe))
vsp1_pipeline_run(pipe); vsp1_pipeline_run(pipe);
spin_unlock_irqrestore(&pipe->irqlock, flags);
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment