From: "Zhi Mao (毛智)" <zhi.mao@mediatek.com>
To: "sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>
Cc: "heiko@sntech.de" <heiko@sntech.de>,
"gerald.loacker@wolfvision.net" <gerald.loacker@wolfvision.net>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"yunkec@chromium.org" <yunkec@chromium.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dan.scally@ideasonboard.com" <dan.scally@ideasonboard.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"Shengnan Wang (王圣男)" <shengnan.wang@mediatek.com>,
"hdegoede@redhat.com" <hdegoede@redhat.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
"Yaya Chang (張雅清)" <Yaya.Chang@mediatek.com>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"jacopo.mondi@ideasonboard.com" <jacopo.mondi@ideasonboard.com>,
"jernej.skrabec@gmail.com" <jernej.skrabec@gmail.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"bingbu.cao@intel.com" <bingbu.cao@intel.com>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"10572168@qq.com" <10572168@qq.com>,
"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>,
"tomi.valkeinen@ideasonboard.com"
<tomi.valkeinen@ideasonboard.com>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"laurent.pinchart@ideasonboard.com"
<laurent.pinchart@ideasonboard.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"macromorgan@hotmail.com" <macromorgan@hotmail.com>
Subject: Re: [PATCH v1 2/2] media: i2c: Add GC05A2 image sensor driver
Date: Sat, 23 Mar 2024 02:59:18 +0000 [thread overview]
Message-ID: <8a6bbbdde57283b5bf8cab0ea7ecb0f201d437e7.camel@mediatek.com> (raw)
In-Reply-To: <ZfqQPTgqzOw7tATK@kekkonen.localdomain>
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
next prev parent reply other threads:[~2024-03-23 2:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-16 2:52 [PATCH v1 0/2] media: i2c: Add support for GC05A2 sensor Zhi Mao
2024-03-16 2:52 ` [PATCH v1 1/2] media: dt-bindings: i2c: add GalaxyCore GC05A2 image sensor Zhi Mao
2024-03-16 2:52 ` [PATCH v1 2/2] media: i2c: Add GC05A2 image sensor driver Zhi Mao
2024-03-20 7:29 ` Sakari Ailus
2024-03-23 2:59 ` Zhi Mao (毛智) [this message]
2024-04-03 4:24 ` Zhi Mao (毛智)
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=8a6bbbdde57283b5bf8cab0ea7ecb0f201d437e7.camel@mediatek.com \
--to=zhi.mao@mediatek.com \
--cc=10572168@qq.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Yaya.Chang@mediatek.com \
--cc=andy.shevchenko@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bingbu.cao@intel.com \
--cc=conor+dt@kernel.org \
--cc=dan.scally@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=gerald.loacker@wolfvision.net \
--cc=hdegoede@redhat.com \
--cc=heiko@sntech.de \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jacopo.mondi@ideasonboard.com \
--cc=jernej.skrabec@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=macromorgan@hotmail.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=shengnan.wang@mediatek.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=yunkec@chromium.org \
/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).