提交 02c0db0c 编写于 作者: D David Plowman 提交者: Zheng Zengkai

media: i2c: imx290: Handle exposure correctly when vblank changes

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

When vblank changes we must modify the exposure range. Also, with this
sensor, the effective exposure time implicitly changes when vblank
does, so we have to reset it after every vblank update.
Signed-off-by: NDavid Plowman <david.plowman@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 f568b2e4
...@@ -618,6 +618,24 @@ static int imx290_set_vmax(struct imx290 *imx290, u32 val) ...@@ -618,6 +618,24 @@ static int imx290_set_vmax(struct imx290 *imx290, u32 val)
if (ret) if (ret)
dev_err(imx290->dev, "Unable to write vmax\n"); dev_err(imx290->dev, "Unable to write vmax\n");
/*
* Changing vblank changes the allowed range for exposure.
* We don't supply the current exposure as default here as it
* may lie outside the new range. We will reset it just below.
*/
__v4l2_ctrl_modify_range(imx290->exposure,
IMX290_EXPOSURE_MIN,
vmax - 2,
IMX290_EXPOSURE_STEP,
vmax - 2);
/*
* Becuse of the way exposure works for this sensor, updating
* vblank causes the effective exposure to change, so we must
* set it back to the "new" correct value.
*/
imx290_set_exposure(imx290, imx290->exposure->val);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册