You need to sign in or sign up before continuing.
提交 1eac1476 编写于 作者: D Dave Stevenson 提交者: Zheng Zengkai

media: i2c: imx290: Explicitly set v&h blank on mode change

raspberrypi inclusion
category: feature
bugzilla: 50432

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

__v4l2_ctrl_modify_range only updates the current value should
it be invalid within the new range. That can leave modes producing
odd frame rates.

Explicitly update the HBLANK and VBLANK values so that on mode
change we revert to the default frame rate for the mode.
Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 97a0aed4
...@@ -796,17 +796,23 @@ static int imx290_set_fmt(struct v4l2_subdev *sd, ...@@ -796,17 +796,23 @@ static int imx290_set_fmt(struct v4l2_subdev *sd,
__v4l2_ctrl_s_ctrl_int64(imx290->pixel_rate, __v4l2_ctrl_s_ctrl_int64(imx290->pixel_rate,
imx290_calc_pixel_rate(imx290)); imx290_calc_pixel_rate(imx290));
if (imx290->hblank) if (imx290->hblank) {
__v4l2_ctrl_modify_range(imx290->hblank, __v4l2_ctrl_modify_range(imx290->hblank,
imx290->hmax_min - mode->width, imx290->hmax_min - mode->width,
IMX290_HMAX_MAX - mode->width, IMX290_HMAX_MAX - mode->width,
1, mode->hmax - mode->width); 1, mode->hmax - mode->width);
if (imx290->vblank) __v4l2_ctrl_s_ctrl(imx290->hblank,
mode->hmax - mode->width);
}
if (imx290->vblank) {
__v4l2_ctrl_modify_range(imx290->vblank, __v4l2_ctrl_modify_range(imx290->vblank,
mode->vmax - mode->height, mode->vmax - mode->height,
IMX290_VMAX_MAX - mode->height, IMX290_VMAX_MAX - mode->height,
1, 1,
mode->vmax - mode->height); mode->vmax - mode->height);
__v4l2_ctrl_s_ctrl(imx290->vblank,
mode->vmax - mode->height);
}
if (imx290->exposure) if (imx290->exposure)
__v4l2_ctrl_modify_range(imx290->exposure, __v4l2_ctrl_modify_range(imx290->exposure,
mode->vmax - mode->height, mode->vmax - mode->height,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册