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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aae670db21a1de622cc89ac637c407bf6452c44f.camel@ndufresne.ca>
Date: Fri, 14 Feb 2025 09:44:05 -0500
From: nicolas@...fresne.ca
To: Paul Elder <paul.elder@...asonboard.com>, linux-media@...r.kernel.org
Cc: kieran.bingham@...asonboard.com, Sakari Ailus
 <sakari.ailus@...ux.intel.com>,  Mauro Carvalho Chehab	
 <mchehab@...nel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: imx335: Set vblank immediately

Hi,

Le vendredi 14 février 2025 à 22:37 +0900, Paul Elder a écrit :
> 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.

Not my field of competence, but won't this cause a flicker ?

Nicolas

> 
> 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,
> +					  IMX335_EXPOSURE_MIN,
> +					  imx335->vblank +
> +					  imx335->cur_mode->height -
> +					  IMX335_EXPOSURE_OFFSET,
> +					  1,
> IMX335_EXPOSURE_DEFAULT);
>  	}
>  
>  	/*
> @@ -575,6 +575,13 @@ static int imx335_set_ctrl(struct v4l2_ctrl
> *ctrl)
>  		return 0;
>  
>  	switch (ctrl->id) {
> +	case V4L2_CID_VBLANK:
> +		exposure = imx335->exp_ctrl->val;
> +		analog_gain = imx335->again_ctrl->val;
> +
> +		ret = imx335_update_exp_gain(imx335, exposure,
> analog_gain);
> +
> +		break;
>  	case V4L2_CID_EXPOSURE:
>  		exposure = ctrl->val;
>  		analog_gain = imx335->again_ctrl->val;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ