From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Return-Path: Date: Wed, 14 Sep 2016 20:28:46 +0200 From: Niklas =?iso-8859-1?Q?S=F6derlund?= To: Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham Subject: Re: [PATCH 03/13] v4l: vsp1: Ensure pipeline locking in resume path Message-ID: <20160914182846.GH739@bigcity.dyn.berto.se> References: <1473808626-19488-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <1473808626-19488-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1473808626-19488-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com> List-ID: On 2016-09-14 02:16:56 +0300, Laurent Pinchart wrote: > From: Kieran Bingham > > 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 > Signed-off-by: Laurent Pinchart Acked-by: Niklas S�derlund > --- > drivers/media/platform/vsp1/vsp1_pipe.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c b/drivers/media/platform/vsp1/vsp1_pipe.c > index 3e75fb3fcace..474de82165d8 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); > } > } > -- > Regards, > > Laurent Pinchart > -- Regards, Niklas S�derlund