[PATCH 11/13] media: i2c: os05b10: Update active format before adjusting framing controls
From: Tarang Raval
Date: Fri Mar 06 2026 - 07:38:13 EST
os05b10_set_pad_format() calls os05b10_set_framing_limits() before updating
the ACTIVE format. As a result, the VBLANK control handler uses the old
height when recalculating exposure limits, causing -ERANGE when switching
to a larger resolution.
Update the ACTIVE format before adjusting framing controls so control
callbacks use the correct dimensions.
Signed-off-by: Tarang Raval <tarang.raval@xxxxxxxxxxxxxxxxx>
---
drivers/media/i2c/os05b10.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/os05b10.c b/drivers/media/i2c/os05b10.c
index 4601e33b7e8f..476dbcb49351 100644
--- a/drivers/media/i2c/os05b10.c
+++ b/drivers/media/i2c/os05b10.c
@@ -902,14 +902,14 @@ static int os05b10_set_pad_format(struct v4l2_subdev *sd,
format = v4l2_subdev_state_get_format(sd_state, 0);
+ *format = fmt->format;
+
if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
ret = os05b10_set_framing_limits(os05b10, mode);
if (ret)
return ret;
}
- *format = fmt->format;
-
return 0;
}
--
2.34.1