From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Zhi Mao <zhi.mao@mediatek.com>
Cc: mchehab@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org,
laurent.pinchart@ideasonboard.com, shengnan.wang@mediatek.com,
yaya.chang@mediatek.com,
Project_Global_Chrome_Upstream_Group@mediatek.com,
yunkec@chromium.org, conor+dt@kernel.org, matthias.bgg@gmail.com,
angelogioacchino.delregno@collabora.com,
jacopo.mondi@ideasonboard.com, 10572168@qq.com,
hverkuil-cisco@xs4all.nl, heiko@sntech.de,
jernej.skrabec@gmail.com, macromorgan@hotmail.com,
linus.walleij@linaro.org, hdegoede@redhat.com,
tomi.valkeinen@ideasonboard.com, gerald.loacker@wolfvision.net,
andy.shevchenko@gmail.com, bingbu.cao@intel.com,
dan.scally@ideasonboard.com, linux-media@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v1 2/2] media: i2c: Add GC05A2 image sensor driver
Date: Wed, 20 Mar 2024 07:29:01 +0000 [thread overview]
Message-ID: <ZfqQPTgqzOw7tATK@kekkonen.localdomain> (raw)
In-Reply-To: <20240316025253.2300-3-zhi.mao@mediatek.com>
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.
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2024-03-20 7:29 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 [this message]
2024-03-23 2:59 ` Zhi Mao (毛智)
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=ZfqQPTgqzOw7tATK@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=10572168@qq.com \
--cc=Project_Global_Chrome_Upstream_Group@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=shengnan.wang@mediatek.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=yaya.chang@mediatek.com \
--cc=yunkec@chromium.org \
--cc=zhi.mao@mediatek.com \
/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).