summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKieran Bingham <kieran+renesas@bingham.xyz>2016-09-02 07:48:27 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-19 14:46:48 -0300
commit7a9e7bd32ba43a050e868ba44c4a0665079a8264 (patch)
treefd0198ca605981b174e181f0ec86d848c32dc1d2
parent34e77ed84b274d20415067306b855bd87f761f5e (diff)
downloadop-kernel-dev-7a9e7bd32ba43a050e868ba44c4a0665079a8264.zip
op-kernel-dev-7a9e7bd32ba43a050e868ba44c4a0665079a8264.tar.gz
[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: Kieran Bingham <kieran+renesas@bingham.xyz> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/platform/vsp1/vsp1_pipe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c b/drivers/media/platform/vsp1/vsp1_pipe.c
index 3e75fb3..474de82 100644
--- a/drivers/media/platform/vsp1/vsp1_pipe.c
+++ b/drivers/media/platform/vsp1/vsp1_pipe.c
@@ -365,6 +365,7 @@ void vsp1_pipelines_suspend(struct vsp1_device *vsp1)
void vsp1_pipelines_resume(struct vsp1_device *vsp1)
{
+ unsigned long flags;
unsigned int i;
/* Resume all running pipelines. */
@@ -379,7 +380,9 @@ void vsp1_pipelines_resume(struct vsp1_device *vsp1)
if (pipe == NULL)
continue;
+ spin_lock_irqsave(&pipe->irqlock, flags);
if (vsp1_pipeline_ready(pipe))
vsp1_pipeline_run(pipe);
+ spin_unlock_irqrestore(&pipe->irqlock, flags);
}
}
OpenPOWER on IntegriCloud