Linux Media Controller development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [RFC 1/4] omap3isp: Implement validate_pipeline
Date: Thu, 15 Dec 2011 11:18:53 +0100	[thread overview]
Message-ID: <201112151118.53618.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <1323942635-13058-1-git-send-email-sakari.ailus@iki.fi>

Hi Sakari,

Thanks for the patch.

On Thursday 15 December 2011 10:50:32 Sakari Ailus wrote:
> Validate pipeline of any external entity connected to the ISP driver.
> The validation of the pipeline for the part that involves links inside the
> domain of another driver must be done by that very driver.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
> ---
>  drivers/media/video/omap3isp/ispvideo.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/video/omap3isp/ispvideo.c
> b/drivers/media/video/omap3isp/ispvideo.c index f229057..17bc03c 100644
> --- a/drivers/media/video/omap3isp/ispvideo.c
> +++ b/drivers/media/video/omap3isp/ispvideo.c
> @@ -355,6 +355,18 @@ static int isp_video_validate_pipeline(struct
> isp_pipeline *pipe) fmt_source.format.height != fmt_sink.format.height)
>  			return -EPIPE;
> 
> +		if (subdev->host_priv) {
> +			/*
> +			 * host_priv != NULL: this is a sensor. Issue
> +			 * validate_pipeline. We're at our end of the
> +			 * pipeline so we quit now.
> +			 */
> +			ret = v4l2_subdev_call(subdev, pad, validate_pipeline);
> +			if (IS_ERR_VALUE(ret))

Is the validate pipeline operation expected to return a value different than 0 
on success ? If not if (ret < 0) should do.

Although there's another issue. Not all sensors will implement the 
validate_pipeline operation, so you shouldn't return an error if ret == -
ENOIOCTLCMD.

I will comment on the validate_pipeline approach itself in the "On controlling 
sensors" mail thread.

> +				return -EPIPE;
> +			break;
> +		}
> +
>  		if (shifter_link) {
>  			unsigned int parallel_shift = 0;
>  			if (isp->isp_ccdc.input == CCDC_INPUT_PARALLEL) {

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2011-12-15 10:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15  9:50 [RFC 0/4] OMAP 3 ISP driver improvements Sakari Ailus
2011-12-15  9:50 ` [RFC 1/4] omap3isp: Implement validate_pipeline Sakari Ailus
2011-12-15 10:18   ` Laurent Pinchart [this message]
2011-12-15 11:53     ` Sakari Ailus
2011-12-15  9:50 ` [RFC 2/4] omap3isp: Add lane configuration to platform data Sakari Ailus
2011-12-15  9:50 ` [RFC 3/4] omap3isp: Configure CSI-2 phy based on " Sakari Ailus
2011-12-15 10:28   ` Laurent Pinchart
2011-12-15 11:53     ` Sakari Ailus
2011-12-15 12:54       ` Laurent Pinchart
2011-12-15 21:50         ` Sakari Ailus
2011-12-19  0:31           ` Laurent Pinchart
2011-12-19  7:17             ` Sakari Ailus
2011-12-19 10:21               ` query video dev node name using the V4L2 device driver name Zhu, Mingcheng
2011-12-19 10:31                 ` Laurent Pinchart
2011-12-19 18:09                   ` Zhu, Mingcheng
2011-12-21  0:34                     ` Laurent Pinchart
2011-12-15  9:50 ` [RFC 4/4] omap3isp: Use pixel clock from sensor media bus frameformat Sakari Ailus
2011-12-15 10:29   ` Laurent Pinchart

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=201112151118.53618.laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@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