Re: [PATCH] media: ov5675: correct the maximum exposure value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Got some information from Shawn, that the code before was align with the spec.

Sakari, please ignore this patch and I will try to figure out the actual reason
of the auto-exposure issue.

Thanks.

On 8/20/20 4:49 PM, Bingbu Cao wrote:
> current ov5675 driver did a wrong calculation for the maximum exposure
> value, it will cause the auto-exposure can not work as expected, this
> patch correct it.
> 
> Signed-off-by: Bingbu Cao <bingbu.cao@xxxxxxxxx>
> ---
>  drivers/media/i2c/ov5675.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
> index 8537cc4ca108..7592cd50807a 100644
> --- a/drivers/media/i2c/ov5675.c
> +++ b/drivers/media/i2c/ov5675.c
> @@ -666,8 +666,8 @@ static int ov5675_set_ctrl(struct v4l2_ctrl *ctrl)
>  	/* Propagate change of current control to all related controls */
>  	if (ctrl->id == V4L2_CID_VBLANK) {
>  		/* Update max exposure while meeting expected vblanking */
> -		exposure_max = (ov5675->cur_mode->height + ctrl->val -
> -			       OV5675_EXPOSURE_MAX_MARGIN) / 2;
> +		exposure_max = ov5675->cur_mode->height + ctrl->val -
> +			OV5675_EXPOSURE_MAX_MARGIN;
>  		__v4l2_ctrl_modify_range(ov5675->exposure,
>  					 ov5675->exposure->minimum,
>  					 exposure_max, ov5675->exposure->step,
> 

-- 
Best regards,
Bingbu Cao



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux