Re: [PATCH v3 07/12] media: i2c: imx214: Add vblank and hblank controls
From: Sakari Ailus
Date: Tue Dec 17 2024 - 02:17:20 EST
Hi André,
On Sun, Dec 15, 2024 at 11:35:41PM +0100, André Apitzsch wrote:
> > > @@ -626,9 +637,36 @@ static int imx214_set_format(struct
> > > v4l2_subdev *sd,
> > > __crop->width = mode->width;
> > > __crop->height = mode->height;
> > >
> > > - if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
> > > + if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
> > > + int exposure_max;
> > > + int exposure_def;
> > > + int hblank;
> > > +
> > > imx214->cur_mode = mode;
> > >
> > > + /* Update FPS limits */
> > nit: Update blank limits
> > > + __v4l2_ctrl_modify_range(imx214->vblank,
> > > IMX214_VBLANK_MIN,
> > > + IMX214_VTS_MAX - mode-
> > > >height, 2,
> > > + mode->vts_def - mode-
> > > >height);
> >
> > Is the handler->lock held when we call this function?
>
> I'm not sure how to test this.
I'd say "yes" because the first patch sets the control handler lock to the
sub-device state lock.
--
Regards,
Sakari Ailus