Re: [PATCH v2 1/2] media: i2c: ov8865: fix horizontal flip control polarity
From: D. Manresa
Date: Fri Aug 28 2026 - 19:18:21 EST
On Wed, 29 Jul 2026, Jakob Berg Jespersen wrote:
> The sensor's native readout is horizontally mirrored and the FORMAT2
> FLIP_HORZ bits (reg 0x3821) un-mirror it. The driver sets those bits for
> V4L2_CID_HFLIP=1, so the control is inverted: HFLIP=1 yields the
> un-mirrored image and HFLIP=0 the mirrored one, the opposite of what is
> requested.
Tested on the rear camera of a Surface Pro 7+ (OV8865 behind an IPU6,
patch applied on v6.19 sources, module built out of tree and loaded on a
linux-surface 6.19.8 kernel). Verified from raw captures at 3264x2448 and
1632x1224:
- HFLIP now toggles the horizontal mirror as requested (verified against a
fixed scene landmark and by column-profile reversal of the raw frames);
- the Bayer order stays BGGR, matching the reported SBGGR10, in every flip
state I could produce (HFLIP/VFLIP 0/0, 1/0, 0/1, 1/1, both readout
sizes) - so no phase compensation is needed on this sensor and existing
colour tunings are unaffected;
- with the fix, libcamera's HFLIP=1 + VFLIP=1 correction for the 180
degree SSDB mount now yields a true 180 degree rotation: the raw frame in
that state is an exact point rotation of the HFLIP=0/VFLIP=0 frame,
where before the series the same request produced the horizontally
mirrored image.
Tested-by: D. Manresa <dmanresa@xxxxxxxxx>