Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] media: i2c: Surface Pro 7+ camera flip fixes
@ 2026-07-29 15:41 Jakob Berg Jespersen
  2026-07-29 15:41 ` [PATCH v2 1/2] media: i2c: ov8865: fix horizontal flip control polarity Jakob Berg Jespersen
  2026-07-29 15:41 ` [PATCH v2 2/2] media: i2c: ov5693: fix horizontal flip polarity and Bayer phase Jakob Berg Jespersen
  0 siblings, 2 replies; 7+ messages in thread
From: Jakob Berg Jespersen @ 2026-07-29 15:41 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab,
	Kévin L'hôpital, Paul Kocialkowski, Daniel Scally,
	Jean-Michel Hautbois
  Cc: Mauro Carvalho Chehab, linux-media, linux-kernel, Daniel Scally,
	Bryan O'Donoghue, Tooraj Taraz, Joseph V. Lavigne, stable,
	Hans de Goede, Jakob Berg Jespersen, Fernando Rimoli

This series fixes an inverted horizontal-flip control on the two
OmniVision sensors of the Microsoft Surface Pro 7+ (front ov5693 and
rear ov8865). Both sensors are mounted with a 180 degree rotation (ACPI
SSDB rotation 180), so libcamera requests HFLIP=1+VFLIP=1 to correct the
mount and, with the inverted control, gets a mirrored image instead. The
ov5693 patch additionally compensates the Bayer phase, which shifts one
column when the flip bits are cleared.

The inverted-HFLIP behaviour has been confirmed on three platforms: the
Surface Pro 7+ (here), a Surface Pro 9 (Fernando Rimoli), and a Surface
Go (Hans de Goede).

  1/2  media: i2c: ov8865: fix horizontal flip control polarity
  2/2  media: i2c: ov5693: fix horizontal flip polarity and Bayer phase

Note: bringing these cameras up on the Surface Pro 7+ needs two
prerequisites this series does not itself depend on -- it concerns only
image orientation and colour. The ov5693 front camera streams on IPU6
only with a MIPI clock-lane-gate write being added by Fernando Rimoli
[1]; and the ov8865 rear camera powers on only with an int3472 POWER1
regulator mapping I posted separately [2].

I discovered these issues independently, though the motivation to work
on the Surface cameras came from the linux-surface community. I'd like
to credit two parallel efforts there on the same hardware family: Tooraj
Taraz observed the inverted feed while adding Surface Pro 9 camera
support out of tree [3], and Joseph V. Lavigne posted an RFC enabling
the ov8865 power supply on the Surface Pro 7+ itself [4]. I have not
drawn on their code here.

Thanks to Sakari, Hans, Bryan and Fernando for the review, testing and
suggestions on v1.

[1] https://lore.kernel.org/linux-media/20260720163819.104130-1-fernandorimoli11@gmail.com/
[2] https://lore.kernel.org/platform-driver-x86/20260729-sp7plus-int3472-v2-1-cdfaf97ac3ad@berg.pm/
[3] https://github.com/linux-surface/linux-surface/pull/1867
[4] https://github.com/linux-surface/linux-surface/pull/2201

---
Changes in v2:
- Simplified both commit messages and the code comments (Sakari, Hans).
- ov5693: dropped the "like the ov8865" cross-reference; made the
  message self-contained (Hans).
- Added Fixes: and Cc: stable to both patches (Bryan).
- Picked up Reviewed-by (Hans, both) and Tested-by (Fernando, ov5693).
- Dropped the RFC prefix.
- Retested on the Surface Pro 7+ (7.1.5): both cameras correctly
  oriented; ov5693 colours correct (Bayer compensation).
- Link to v1: https://patch.msgid.link/20260720-sp7plus-ov-flips-v1-0-5f345b0673de@berg.pm

To: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Kévin L'hôpital <kevin.lhopital@bootlin.com>
To: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Daniel Scally <dan.scally@ideasonboard.com>
To: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Daniel Scally <djrscally@gmail.com>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Tooraj Taraz <tooraj.taraz@yahoo.com>
Cc: Joseph V. Lavigne <jlavig88@gmail.com>

---
Jakob Berg Jespersen (2):
      media: i2c: ov8865: fix horizontal flip control polarity
      media: i2c: ov5693: fix horizontal flip polarity and Bayer phase

 drivers/media/i2c/ov5693.c | 12 +++++++++++-
 drivers/media/i2c/ov8865.c |  3 ++-
 2 files changed, 13 insertions(+), 2 deletions(-)
---
base-commit: a52e6f7923c17a672135b485ffd96fbd72f46267
change-id: 20260720-sp7plus-ov-flips-b6cc645236b6

Best regards,
--  
Jakob Berg Jespersen <dev@berg.pm>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-03 12:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 15:41 [PATCH v2 0/2] media: i2c: Surface Pro 7+ camera flip fixes Jakob Berg Jespersen
2026-07-29 15:41 ` [PATCH v2 1/2] media: i2c: ov8865: fix horizontal flip control polarity Jakob Berg Jespersen
2026-08-28 23:18   ` D. Manresa
2026-07-29 15:41 ` [PATCH v2 2/2] media: i2c: ov5693: fix horizontal flip polarity and Bayer phase Jakob Berg Jespersen
2026-08-28 23:18   ` D. Manresa
2026-08-29 13:21     ` Jakob Berg Jespersen
2026-09-03 12:57       ` D. Manresa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox