* [PATCH] media: ov5675: correct the maximum exposure value
@ 2020-08-20 8:49 Bingbu Cao
2020-08-21 3:12 ` Bingbu Cao
0 siblings, 1 reply; 2+ messages in thread
From: Bingbu Cao @ 2020-08-20 8:49 UTC (permalink / raw)
To: linux-media, sakari.ailus, shawnx.tu
Cc: senozhatsky, tfiga, bingbu.cao, bingbu.cao, hongju.wang
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@intel.com>
---
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,
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: ov5675: correct the maximum exposure value
2020-08-20 8:49 [PATCH] media: ov5675: correct the maximum exposure value Bingbu Cao
@ 2020-08-21 3:12 ` Bingbu Cao
0 siblings, 0 replies; 2+ messages in thread
From: Bingbu Cao @ 2020-08-21 3:12 UTC (permalink / raw)
To: Bingbu Cao, linux-media, sakari.ailus, shawnx.tu
Cc: senozhatsky, tfiga, hongju.wang
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@intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-21 3:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20 8:49 [PATCH] media: ov5675: correct the maximum exposure value Bingbu Cao
2020-08-21 3:12 ` Bingbu Cao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).