[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a6bbbdde57283b5bf8cab0ea7ecb0f201d437e7.camel@mediatek.com>
Date: Sat, 23 Mar 2024 02:59:18 +0000
From: Zhi Mao (毛智) <zhi.mao@...iatek.com>
To: "sakari.ailus@...ux.intel.com" <sakari.ailus@...ux.intel.com>
CC: "heiko@...ech.de" <heiko@...ech.de>, "gerald.loacker@...fvision.net"
<gerald.loacker@...fvision.net>, "robh+dt@...nel.org" <robh+dt@...nel.org>,
"yunkec@...omium.org" <yunkec@...omium.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "dan.scally@...asonboard.com"
<dan.scally@...asonboard.com>, "linux-media@...r.kernel.org"
<linux-media@...r.kernel.org>,
Shengnan Wang (王圣男)
<shengnan.wang@...iatek.com>, "hdegoede@...hat.com" <hdegoede@...hat.com>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
Yaya Chang (張雅清) <Yaya.Chang@...iatek.com>,
"mchehab@...nel.org" <mchehab@...nel.org>, "jacopo.mondi@...asonboard.com"
<jacopo.mondi@...asonboard.com>, "jernej.skrabec@...il.com"
<jernej.skrabec@...il.com>, "linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>, "bingbu.cao@...el.com"
<bingbu.cao@...el.com>, Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@...iatek.com>, "conor+dt@...nel.org"
<conor+dt@...nel.org>, "10572168@...com" <10572168@...com>,
"hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>,
"tomi.valkeinen@...asonboard.com" <tomi.valkeinen@...asonboard.com>,
"krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com"
<matthias.bgg@...il.com>, "laurent.pinchart@...asonboard.com"
<laurent.pinchart@...asonboard.com>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>, "macromorgan@...mail.com"
<macromorgan@...mail.com>
Subject: Re: [PATCH v1 2/2] media: i2c: Add GC05A2 image sensor driver
Hi Sakari,
Thanks for your review.
On Wed, 2024-03-20 at 07:29 +0000, Sakari Ailus wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> Hi Zhi,
>
> Thanks for the set.
>
> On Sat, Mar 16, 2024 at 10:52:53AM +0800, Zhi Mao wrote:
> > +static int gc05a2_set_ctrl(struct v4l2_ctrl *ctrl)
> > +{
> > +struct gc05a2 *gc05a2 =
> > +container_of(ctrl->handler, struct gc05a2, ctrls);
> > +int ret = 0;
> > +s64 exposure_max;
> > +struct v4l2_subdev_state *state;
> > +const struct v4l2_mbus_framefmt *format;
> > +
> > +state = v4l2_subdev_get_locked_active_state(&gc05a2->sd);
> > +format = v4l2_subdev_state_get_format(state, 0);
> > +
> > +if (ctrl->id == V4L2_CID_VBLANK) {
> > +/* Update max exposure while meeting expected vblanking */
> > +exposure_max = format->height + ctrl->val - GC05A2_EXP_MARGIN;
> > +__v4l2_ctrl_modify_range(gc05a2->exposure,
> > + gc05a2->exposure->minimum,
> > + exposure_max, gc05a2->exposure->step,
> > + exposure_max);
> > +}
> > +
> > +/*
> > + * Applying V4L2 control value only happens
> > + * when power is on for streaming.
> > + */
> > +if (!pm_runtime_get_if_in_use(gc05a2->dev))
>
> This should be pm_runtime_get_if_active(). Please assume it takes a
> single
> argument (the device)---see commit
> c0ef3df8dbaef51ee4cfd58a471adf2eaee6f6b3.
>
> The same comment applies to the GC08A3 if it uses autosuspend, please
> post
> a new patch for that.
>
fixed, patch as below:
gc05a patch:v2
https://lore.kernel.org/linux-media/20240323014751.4989-1-zhi.mao@mediatek.com/
gc08a patch:v8
https://lore.kernel.org/linux-media/20240323023851.5503-1-zhi.mao@mediatek.com/
> --
> Kind regards,
>
> Sakari Ailus
Powered by blists - more mailing lists