[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250911-imx335_binning-v2-4-30a28df74df6@ideasonboard.com>
Date: Thu, 11 Sep 2025 13:44:20 +0530
From: Jai Luthra <jai.luthra@...asonboard.com>
To: Kieran Bingham <kieran.bingham@...asonboard.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Tommaso Merciai <tomm.merciai@...il.com>
Subject: [PATCH v2 4/8] 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@...asonboard.com>
Signed-off-by: Jai Luthra <jai.luthra@...asonboard.com>
---
drivers/media/i2c/imx335.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
index 3522a6b1ca14e27c46a55e18e5bf51240ea5a6ee..62a76517ecb263a4fd7e7a593c02a3cdaf3da190 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;
--
2.51.0
Powered by blists - more mailing lists