From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se> Cc: linux-media@vger.kernel.org, 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 15:16:52 +0300 [thread overview] Message-ID: <20190704121652.GD6569@pendragon.ideasonboard.com> (raw) In-Reply-To: <20190704015817.17083-5-niklas.soderlund+renesas@ragnatech.se> Hi Niklas, Thank you for the patch. On Thu, Jul 04, 2019 at 03:58:17AM +0200, Niklas Söderlund wrote: > Now that both Gen2 (device centric) and Gen3 (media device centric) > modes of this driver have controls it make sens to call s/sens/sense/ > v4l2_ctrl_handler_setup() unconditionally when opening the video device. Not only does it make sense, but it's required by 3/4. I think you should explain why in the commit message. Apart from that, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > 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; > -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: -- Regards, Laurent Pinchart
next prev parent reply other threads:[~2019-07-04 12:17 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 [this message] 2019-07-04 15:55 ` Kieran Bingham
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=20190704121652.GD6569@pendragon.ideasonboard.com \ --to=laurent.pinchart@ideasonboard.com \ --cc=linux-media@vger.kernel.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=niklas.soderlund+renesas@ragnatech.se \ --subject='Re: [PATCH v3 4/4] rcar-vin: Always setup controls when opening video device' \ /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
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).