linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mani, Rajmohan" <rajmohan.mani@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Jacopo Mondi <jacopo@jmondi.org>,
	"Qiu, Tian Shu" <tian.shu.qiu@intel.com>,
	"Cao, Bingbu" <bingbu.cao@intel.com>,
	"Zhi@paasikivi.fi.intel.com" <Zhi@paasikivi.fi.intel.com>,
	"Zhi, Yong" <yong.zhi@intel.com>,
	"hverkuil@xs4all.nl" <hverkuil@xs4all.nl>,
	"tfiga@chromium.org" <tfiga@chromium.org>
Subject: RE: [PATCH] media: staging/intel-ipu3: Implement lock for stream on/off operations
Date: Mon, 4 Feb 2019 17:43:30 +0000	[thread overview]
Message-ID: <6F87890CF0F5204F892DEA1EF0D77A599B325D85@fmsmsx122.amr.corp.intel.com> (raw)
In-Reply-To: 20190201163655.ufrazkvsabsp6gmv@paasikivi.fi.intel.com

Hi Sakari,

[snip]

> > > > >  fail_stop_pipeline:
> > > > > @@ -543,6 +546,8 @@ static void ipu3_vb2_stop_streaming(struct
> > > > vb2_queue *vq)
> > > > >  		dev_err(&imgu->pci_dev->dev,
> > > > >  			"failed to stop subdev streaming\n");
> > > > >
> > > > > +	mutex_lock(&imgu->streaming_lock);
> > > > > +
> > > > >  	/* Was this the first node with streaming disabled? */
> > > > >  	if (imgu->streaming && ipu3_all_nodes_streaming(imgu, node)) {
> > > > >  		/* Yes, really stop streaming now */ @@ -552,6 +557,7 @@
> > > > static
> > > > > void ipu3_vb2_stop_streaming(struct vb2_queue *vq)
> > > > >  			imgu->streaming = false;
> > > > >  	}
> > > > >
> > > > > +	mutex_unlock(&imgu->streaming_lock);
> > > > >  	ipu3_return_all_buffers(imgu, node, VB2_BUF_STATE_ERROR);
> >
> > I'd also call ipu3_return_all_buffers() before releasing the lock: in
> > principle the user may have queued new buffers on the devices before
> > the driver marks the buffers as faulty.
> >

Ack
(Somehow I missed this comment.)

[snip]

      parent reply	other threads:[~2019-02-04 17:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 22:27 [PATCH] media: staging/intel-ipu3: Implement lock for stream on/off operations Rajmohan Mani
2019-01-30  8:59 ` Sakari Ailus
2019-01-30 17:17   ` Mani, Rajmohan
2019-01-31 12:18     ` Sakari Ailus
     [not found]     ` <20190201163655.ufrazkvsabsp6gmv@paasikivi.fi.intel.com>
2019-02-01 19:13       ` Mani, Rajmohan
2019-02-04 17:43       ` Mani, Rajmohan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6F87890CF0F5204F892DEA1EF0D77A599B325D85@fmsmsx122.amr.corp.intel.com \
    --to=rajmohan.mani@intel.com \
    --cc=Zhi@paasikivi.fi.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tfiga@chromium.org \
    --cc=tian.shu.qiu@intel.com \
    --cc=yong.zhi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).