[PATCH v4 03/16] media: sony-starvis2: Always program the sensor in window mode

From: Dave Stevenson

Date: Thu Oct 15 2026 - 12:07:20 EST


If the requested region matched the defined active area then
the driver switched to all-pixel mode. This left the possibility
that the active area was incorrect and not reading out the area
expected.

Switch to always requesting window mode to avoid this potential
mismatch.

Signed-off-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
---
drivers/media/i2c/sony-starvis2.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/i2c/sony-starvis2.c b/drivers/media/i2c/sony-starvis2.c
index 3656658e18a4..c4f590c489d9 100644
--- a/drivers/media/i2c/sony-starvis2.c
+++ b/drivers/media/i2c/sony-starvis2.c
@@ -921,9 +921,7 @@ static int starvis2_program_window(struct starvis2 *starvis2,
int ret = 0;

cci_write(starvis2->cci, STARVIS2_REG_ADDMODE, 0x00, &ret);
- cci_write(starvis2->cci, STARVIS2_REG_WINMODE,
- v4l2_rect_equal(crop, &imx678_active_area) ? 0x00 : 0x04,
- &ret);
+ cci_write(starvis2->cci, STARVIS2_REG_WINMODE, 0x04, &ret);
cci_write(starvis2->cci, STARVIS2_REG_PIX_HST,
crop->left - imx678_active_area.left, &ret);
cci_write(starvis2->cci, STARVIS2_REG_PIX_HWIDTH, crop->width, &ret);

--
2.34.1