Skip to contentSkip to conversation

media: ipu-bridge: Add upside-down quirk for Surface Pro 11

PATCH New Sergey Lebedev 1 participant 1 message Sep 17 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 media: ipu-bridge: Add upside-down quirk for Surface Pro 11

The Microsoft Surface Pro for Business 11th Edition with Intel mounts its OV13858 rear sensor rotated 180 degrees, but reports a rotation of 0 in its SSDB and has no matching _PLD, so without a DMI quirk the image is presented upside down.

Add a DMI quirk entry for this model so that a rotation of 180 degrees is reported for its OVTID858 sensor.

Tested on the affected machine: camera_sensor_rotation reads 180 and libcamera reports Rotation = 180. Confirmed independently on a second machine of the same model, where GNOME Snapshot and Firefox present the image the right way up once the quirk is applied; qcam, which talks to libcamera directly, does not.

---
Changes in v2:
- shortened the commit message, per Sakari's review of v1
- moved the entry into vendor order, before the Samsung entries
- added German Pablo Lindo's Tested-by

v1: https://lore.kernel.org/linux-media/[email protected]/

The quirk only has an effect once OVTID858 is a recognised sensor, which
https://lore.kernel.org/linux-media/[email protected]/
adds; this patch applies to media/next independently of it.

 drivers/media/pci/intel/ipu-bridge.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/media/pci/intel/ipu-bridge.c +8 -0
index 952868ad8..0e4bb9d73 100644
@@ -210,6 +210,14 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
 		},
 		.driver_data = "SONY471A",
 	},
+	{
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME,
+					"Surface Pro for Business 11th Edition with Intel"),
+		},
+		.driver_data = "OVTID858",
+	},
 	{
 		/* Samsung Galaxy Book5 Pro 360 */
 		.matches = {
Signature · 1 line
2.54.0 (Apple Git-157)