From: Jai Luthra Date: Thu, 30 Oct 2025 08:42:57 +0000 (+0530) Subject: media: imx335: Update HBLANK range on mode change X-Git-Tag: v6.19-rc1~159^2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d64ec84ac01b100619f68929a7e29f00617a6ffd;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c index d30fce32cb010..b03e3e14d0880 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;