linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	linux-media@vger.kernel.org, linux-sh@vger.kernel.org,
	Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH v2 5/5] v4l: Renesas R-Car VSP1 driver
Date: Wed, 31 Jul 2013 15:13:23 +0000	[thread overview]
Message-ID: <10114832.8cJjIM5xok@avalon> (raw)
In-Reply-To: <20130725134328.GH12281@valkosipuli.retiisi.org.uk>

Hi Sakari,

On Thursday 25 July 2013 16:43:28 Sakari Ailus wrote:
> On Thu, Jul 25, 2013 at 01:46:54PM +0200, Laurent Pinchart wrote:
> > > On Wed, Jul 17, 2013 at 04:54:42PM +0200, Laurent Pinchart wrote:
> > > ...
> > > 
> > > > +static void vsp1_device_init(struct vsp1_device *vsp1)
> > > > +{
> > > > +	unsigned int i;
> > > > +	u32 status;
> > > > +
> > > > +	/* Reset any channel that might be running. */
> > > > +	status = vsp1_read(vsp1, VI6_STATUS);
> > > > +
> > > > +	for (i = 0; i < VPS1_MAX_WPF; ++i) {
> > > > +		unsigned int timeout;
> > > > +
> > > > +		if (!(status & VI6_STATUS_SYS_ACT(i)))
> > > > +			continue;
> > > > +
> > > > +		vsp1_write(vsp1, VI6_SRESET, VI6_SRESET_SRTS(i));
> > > > +		for (timeout = 10; timeout > 0; --timeout) {
> > > > +			status = vsp1_read(vsp1, VI6_STATUS);
> > > > +			if (!(status & VI6_STATUS_SYS_ACT(i)))
> > > > +				break;
> > > > +
> > > > +			usleep_range(1000, 2000);
> > > > +		}
> > > > +
> > > > +		if (timeout)
> > > > +			dev_err(vsp1->dev, "failed to reset wpf.%u\n", i);
> > > 
> > > Have you seen this happening in practice? Do you expect the device to
> > > function if resetting it fails?
> > 
> > I've seen this happening during development when I had messed up register
> > values, but not otherwise. I don't expect the deviec to still function if
> > resetting the WPF fails, but I need to make sure that the busy loop exits.
> 
> Shouldn't you also return an error in this case? The function currently
> returns void.

I will fix that.

> ...
> 
> > > > +	/* Follow links downstream for each input and make sure the graph
> > > > +	 * contains no loop and that all branches end at the output WPF.
> > > > +	 */
> > > 
> > > I wonder if checking for loops should be done already in pipeline
> > > validation done by the framework. That's fine to do later on IMHO, too.
> > 
> > It would have to be performed by the core, as the callbacks are local to
> > links. That's feasible (but should be optional, as some devices might
> > support circular graphs), feel free to submit a patch :-)
> 
> As a matter of fact I think I will. I'd like you to test it though since I
> have no hardware with such media graph. :-)

Sure :-)

> But please don't expect to see that in time for your driver to get in. Let's
> think about that later on.

OK.

-- 
Regards,

Laurent Pinchart


      reply	other threads:[~2013-07-31 15:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 14:54 [PATCH v2 0/5] Renesas VSP1 driver Laurent Pinchart
2013-07-17 14:54 ` [PATCH v2 1/5] media: Fix circular graph traversal Laurent Pinchart
2013-07-17 19:47   ` Sakari Ailus
2013-07-17 23:06     ` Laurent Pinchart
2013-07-18 10:22       ` Sakari Ailus
2013-07-24 14:09         ` Laurent Pinchart
2013-07-17 14:54 ` [PATCH v2 2/5] v4l: Fix V4L2_MBUS_FMT_YUV10_1X30 media bus pixel code value Laurent Pinchart
2013-07-17 14:54 ` [PATCH v2 3/5] v4l: Add media format codes for ARGB8888 and AYUV8888 on 32-bit busses Laurent Pinchart
2013-07-24 21:26   ` Sylwester Nawrocki
2013-07-25 11:44     ` Laurent Pinchart
2013-07-17 14:54 ` [PATCH v2 4/5] v4l: Add V4L2_PIX_FMT_NV16M and V4L2_PIX_FMT_NV61M formats Laurent Pinchart
2013-07-24 21:23   ` Sylwester Nawrocki
     [not found] ` <1374072882-14598-6-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
2013-07-24 10:38   ` [PATCH v2 5/5] v4l: Renesas R-Car VSP1 driver Katsuya MATSUBARA
2013-07-24 15:05     ` Laurent Pinchart
2013-07-24 22:48   ` Sakari Ailus
2013-07-25 11:46     ` Laurent Pinchart
2013-07-25 13:43       ` Sakari Ailus
2013-07-31 15:13         ` Laurent Pinchart [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=10114832.8cJjIM5xok@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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).