summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJai Luthra <jai.luthra@ideasonboard.com>2025-10-30 14:12:57 +0530
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-11-13 10:57:52 +0100
commitd64ec84ac01b100619f68929a7e29f00617a6ffd (patch)
treee4e8fcac5c0c1c51dbe5dd4b1aa85d0edf1e9ee7
parentb82801a11fd6c26cc6c74e277e44bbc4481dde56 (diff)
media: imx335: Update HBLANK range on mode change
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>
-rw-r--r--drivers/media/i2c/imx335.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
index d30fce32cb01..b03e3e14d088 100644
--- a/drivers/media/i2c/imx335.c
+++ b/drivers/media/i2c/imx335.c
@@ -493,7 +493,8 @@ static int imx335_update_controls(struct imx335 *imx335,
if (ret)
return ret;
- ret = __v4l2_ctrl_s_ctrl(imx335->hblank_ctrl, mode->hblank);
+ ret = __v4l2_ctrl_modify_range(imx335->hblank_ctrl, mode->hblank,
+ mode->hblank, 1, mode->hblank);
if (ret)
return ret;