Skip to content

Commit 1d2e3b4

Browse files
Hans de GoedeHans Verkuil
authored andcommitted
media: ov02c10: Fix the horizontal flip control
During sensor calibration I noticed that with the hflip control set to false/disabled the image was mirrored. The horizontal flip control is inverted and needs to be set to 1 to not flip. This is something which seems to be common with various recent Omnivision sensors, the ov01a10 and ov08x40 also have an inverted mirror control. Invert the hflip control to fix the sensor mirroring by default. Fixes: b7cd2ba ("media: ov02c10: Support hflip and vflip") Cc: [email protected] Reviewed-by: Bryan O'Donoghue <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Tested-by: Sebastian Reichel <[email protected]> # T14s Gen6 Snapdragon Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent d0bb6f1 commit 1d2e3b4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/media/i2c/ov02c10.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static const struct reg_sequence sensor_1928x1092_30fps_setting[] = {
170170
{0x3816, 0x01},
171171
{0x3817, 0x01},
172172

173-
{0x3820, 0xa0},
173+
{0x3820, 0xa8},
174174
{0x3821, 0x00},
175175
{0x3822, 0x80},
176176
{0x3823, 0x08},
@@ -462,9 +462,9 @@ static int ov02c10_set_ctrl(struct v4l2_ctrl *ctrl)
462462

463463
case V4L2_CID_HFLIP:
464464
cci_write(ov02c10->regmap, OV02C10_ISP_X_WIN_CONTROL,
465-
ctrl->val ? 1 : 2, &ret);
465+
ctrl->val ? 2 : 1, &ret);
466466
cci_update_bits(ov02c10->regmap, OV02C10_ROTATE_CONTROL,
467-
BIT(3), ov02c10->hflip->val << 3, &ret);
467+
BIT(3), ctrl->val ? 0 : BIT(3), &ret);
468468
break;
469469

470470
case V4L2_CID_VFLIP:

0 commit comments

Comments
 (0)