On Tue Sep 15 01:01:40 2026 +0100, Fernando Rimoli wrote:
> The Microsoft Surface Pro 9 mounts both its front sensor (OVTI5693) and
> its rear one (OVTID858) rotated 180 degrees, and its SSDB reports 0 for
> each, so frames from either arrive inverted with nothing to say so.
> 
> Add both to upside_down_sensor_dmi_ids. The two entries carry identical
> DMI matches and differ only in the ACPI HID they gate on, which works
> because ipu_bridge_parse_rotation() walks every matching DMI entry rather
> than stopping at the first one.
> 
> Measured on a Surface Pro 9, DMI product SKU Surface_Pro_9_2038, IPU6
> Alder Lake-P 8086:465d, where the inversion of both sensors was confirmed
> visually. Matched on DMI_PRODUCT_NAME as the rest of the table is, rather
> than on the narrower SKU: the entries only take effect when the ACPI HID
> matches too, so a variant of the same model that shipped different
> sensors is left alone.
> 
> This makes the kernel report the mounting truthfully and does no more
> than that. Nothing in the bridge rotates pixels, so an application that
> reads the property can turn the image the right way up while one that
> ignores it still shows it inverted.
> 
> Signed-off-by: Fernando Rimoli <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 drivers/media/pci/intel/ipu-bridge.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

---

diff --git a/drivers/media/pci/intel/ipu-bridge.c 
b/drivers/media/pci/intel/ipu-bridge.c
index 08b691ce0acd..fbe932cabeba 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -255,6 +255,22 @@ static const struct dmi_system_id 
upside_down_sensor_dmi_ids[] = {
                },
                .driver_data = "OVTI02C1",
        },
+       {
+               /* Microsoft Surface Pro 9, front sensor */
+               .matches = {
+                       DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft 
Corporation"),
+                       DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Pro 9"),
+               },
+               .driver_data = "OVTI5693",
+       },
+       {
+               /* Microsoft Surface Pro 9, rear sensor */
+               .matches = {
+                       DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft 
Corporation"),
+                       DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Pro 9"),
+               },
+               .driver_data = "OVTID858",
+       },
        {} /* Terminating entry */
 };
 
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to