Re: [PATCH v1 2/2] media: i2c: Add GC05A2 image sensor driver

From: Zhi Mao (毛智)
Date: Fri Mar 22 2024 - 22:59:44 EST


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@xxxxxxxxxxxx/

gc08a patch:v8

https://lore.kernel.org/linux-media/20240323023851.5503-1-zhi.mao@xxxxxxxxxxxx/

> --
> Kind regards,
>
> Sakari Ailus