Skip to content

Commit e7e3b59

Browse files
jailuthrapelwell
authored andcommitted
media: imx335: Update HBLANK range on mode change
commit d64ec84 upstream. While switching modes, updating to a different value of HBLANK isn't sufficient, as this is a read-only control with a single allowed value, and thus hblank_min == hblank_max == hblank of the default mode. So to correctly update the user-facing value of the HBLANK parameter, which is necessary for correct framerate calculation, update the whole range when switching modes. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
1 parent 29bd527 commit e7e3b59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/media/i2c/imx335.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ static int imx335_update_controls(struct imx335 *imx335,
493493
if (ret)
494494
return ret;
495495

496-
ret = __v4l2_ctrl_s_ctrl(imx335->hblank_ctrl, mode->hblank);
496+
ret = __v4l2_ctrl_modify_range(imx335->hblank_ctrl, mode->hblank,
497+
mode->hblank, 1, mode->hblank);
497498
if (ret)
498499
return ret;
499500

0 commit comments

Comments
 (0)