lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z8F_wardyYM7sCQx@pyrite.rasen.tech>
Date: Fri, 28 Feb 2025 18:20:01 +0900
From: Paul Elder <paul.elder@...asonboard.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: linux-media@...r.kernel.org, kieran.bingham@...asonboard.com,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: imx335: Set vblank immediately

On Wed, Feb 26, 2025 at 08:56:06AM +0000, Sakari Ailus wrote:
> Hi Paul,
> 
> On Wed, Feb 26, 2025 at 05:49:07PM +0900, Paul Elder wrote:
> > Hi Sakari,
> > 
> > Thanks for the review.
> > 
> > On Sun, Feb 16, 2025 at 10:01:27AM +0000, Sakari Ailus wrote:
> > > Hi Paul,
> > > 
> > > On Fri, Feb 14, 2025 at 10:37:09PM +0900, Paul Elder wrote:
> > > > When the vblank v4l2 control is set, it does not get written to the
> > > > hardware immediately. It only gets updated when exposure is set. Change
> > > > the behavior such that the vblank is written immediately when the
> > > > control is set.
> > > > 
> > > > Signed-off-by: Paul Elder <paul.elder@...asonboard.com>
> > > > ---
> > > >  drivers/media/i2c/imx335.c | 19 +++++++++++++------
> > > >  1 file changed, 13 insertions(+), 6 deletions(-)
> > > > 
> > > > diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
> > > > index fcfd1d851bd4..e73a23bbbc89 100644
> > > > --- a/drivers/media/i2c/imx335.c
> > > > +++ b/drivers/media/i2c/imx335.c
> > > > @@ -559,12 +559,12 @@ static int imx335_set_ctrl(struct v4l2_ctrl *ctrl)
> > > >  			imx335->vblank,
> > > >  			imx335->vblank + imx335->cur_mode->height);
> > > >  
> > > > -		return __v4l2_ctrl_modify_range(imx335->exp_ctrl,
> > > > -						IMX335_EXPOSURE_MIN,
> > > > -						imx335->vblank +
> > > > -						imx335->cur_mode->height -
> > > > -						IMX335_EXPOSURE_OFFSET,
> > > > -						1, IMX335_EXPOSURE_DEFAULT);
> > > > +		 __v4l2_ctrl_modify_range(imx335->exp_ctrl,
> > > 
> > > Indentation.
> > > 
> > > You're also missing an error check here.
> > 
> > I reasoned that it's fine to not have the error check.
> > 
> > afaiu, the only change this has to error is if try/s_ctrl on
> > V4L2_CID_EXPOSURE fails when the change to the range of valid exposure
> > values requires a new exposure value to be set. Setting the exposure
> > control comes back to this function, and goes through the switch-case
> > and imx335_update_exp_gain() below, which doesn't fail.
> 
> It will fail if cci_write() it calls does.

Hm good point. I suppose we don't actually want to continue on if it
does fail... ok I'll fix it.

> 
> > 
> > Also the imx219 has the exact same pattern in imx219_set_ctrl.
> 
> Feel free to fix it. :-)

:)


Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ