linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3 4/4] rcar-vin: Always setup controls when opening video device
Date: Thu, 4 Jul 2019 16:55:13 +0100	[thread overview]
Message-ID: <1b903d9d-cef5-54b0-3ed8-736fe081737f@ideasonboard.com> (raw)
In-Reply-To: <20190704015817.17083-5-niklas.soderlund+renesas@ragnatech.se>

Hi Niklas,

On 04/07/2019 02:58, Niklas Söderlund wrote:
> Now that both Gen2 (device centric) and Gen3 (media device centric)

s/Gen2 (device centric)/Gen2 (video device centric)/ ?
  (only if you feel it helps clarify the distinction).

> modes of this driver have controls it make sens to call

s/sens/sense/

> v4l2_ctrl_handler_setup() unconditionally when opening the video device.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  drivers/media/platform/rcar-vin/rcar-v4l2.c | 30 ++++++++++-----------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> index f8b6ec4408b2f5fa..cbf5d8cd6db32d77 100644
> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> @@ -789,26 +789,26 @@ static int rvin_open(struct file *file)
>  	if (ret)
>  		goto err_unlock;
>  
> -	if (vin->info->use_mc) {
> +	if (vin->info->use_mc)
>  		ret = v4l2_pipeline_pm_use(&vin->vdev.entity, 1);
> -		if (ret < 0)
> -			goto err_open;
> -	} else {
> -		if (v4l2_fh_is_singular_file(file)) {
> -			ret = rvin_power_parallel(vin, true);
> -			if (ret < 0)
> -				goto err_open;
> +	else if (v4l2_fh_is_singular_file(file))
> +		ret = rvin_power_parallel(vin, true);
> +
> +	if (ret < 0)
> +		goto err_open;
> +
> +	ret = v4l2_ctrl_handler_setup(&vin->ctrl_handler);
> +	if (ret)
> +		goto err_power;
>  
> -			ret = v4l2_ctrl_handler_setup(&vin->ctrl_handler);
> -			if (ret)
> -				goto err_parallel;
> -		}
> -	}
>  	mutex_unlock(&vin->lock);
>  
>  	return 0;

It was already here before this patch, but a new line would be nice here
to separate the error paths...

Otherwise,

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>


> -err_parallel:
> -	rvin_power_parallel(vin, false);
> +err_power:
> +	if (vin->info->use_mc)
> +		v4l2_pipeline_pm_use(&vin->vdev.entity, 0);
> +	else if (v4l2_fh_is_singular_file(file))
> +		rvin_power_parallel(vin, false);
>  err_open:
>  	v4l2_fh_release(file);
>  err_unlock:
> 


      parent reply	other threads:[~2019-07-04 15:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04  1:58 [PATCH v3 0/4] rcar-vin: Add support for RGB formats with alpha Niklas Söderlund
2019-07-04  1:58 ` [PATCH v3 1/4] rcar-vin: Rename VNDMR_DTMD_ARGB1555 to VNDMR_DTMD_ARGB Niklas Söderlund
2019-07-04 14:13   ` Kieran Bingham
2019-07-04  1:58 ` [PATCH v3 2/4] rcar-vin: Add control for alpha component Niklas Söderlund
2019-07-04 15:15   ` Kieran Bingham
2019-07-04 15:35     ` Niklas Söderlund
2019-07-04  1:58 ` [PATCH v3 3/4] rcar-vin: Add support for RGB formats with " Niklas Söderlund
2019-07-04 12:14   ` Laurent Pinchart
2019-07-04 15:50   ` Kieran Bingham
2019-07-04  1:58 ` [PATCH v3 4/4] rcar-vin: Always setup controls when opening video device Niklas Söderlund
2019-07-04 12:16   ` Laurent Pinchart
2019-07-04 15:55   ` Kieran Bingham [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=1b903d9d-cef5-54b0-3ed8-736fe081737f@ideasonboard.com \
    --to=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    /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).