* [PATCH v1 0/2] media: support upside-down camera mounting
@ 2026-10-07 3:49 Jimmy Su
2026-10-07 3:49 ` [PATCH v1 1/2] media: ipu-bridge: extend upside-down matching with DSM module IDs Jimmy Su
2026-10-07 3:49 ` [PATCH v1 2/2] media: ipu-bridge: add upside-down quirks for Dell PA14260 & DA14260 Jimmy Su
0 siblings, 2 replies; 3+ messages in thread
From: Jimmy Su @ 2026-10-07 3:49 UTC (permalink / raw)
To: linux-media; +Cc: sakari.ailus, jimmy.su, serin.yeh, vicamo, sarang.sapre
Some platforms use camera sensors mounted upside-down. This series adds
support for handling these sensors to ensure that captured images match the
device's mechanical orientation.
- Extend ipu-bridge upside-down matching with ACPI _DSM module identifiers.
- Add upside-down quirks for selected Dell products
Jimmy Su (2):
media: ipu-bridge: extend upside-down matching with DSM module IDs
media: ipu-bridge: add upside-down quirks for Dell PA14260 & DA14260
drivers/media/pci/intel/ipu-bridge.c | 119 ++++++++++++++++++++++++---
1 file changed, 106 insertions(+), 13 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v1 1/2] media: ipu-bridge: extend upside-down matching with DSM module IDs
2026-10-07 3:49 [PATCH v1 0/2] media: support upside-down camera mounting Jimmy Su
@ 2026-10-07 3:49 ` Jimmy Su
2026-10-07 3:49 ` [PATCH v1 2/2] media: ipu-bridge: add upside-down quirks for Dell PA14260 & DA14260 Jimmy Su
1 sibling, 0 replies; 3+ messages in thread
From: Jimmy Su @ 2026-10-07 3:49 UTC (permalink / raw)
To: linux-media; +Cc: sakari.ailus, jimmy.su, serin.yeh, vicamo, sarang.sapre
The existing upside-down sensor detection relies on sensor HID matching.
However, some platforms may source camera modules from multiple vendors.
While the sensor HID remains the same, camera modules from different
vendors may be mounted in different orientations.
Extend the upside-down matching mechanism to support ACPI _DSM module
identifiers. The driver retrieves the module ID from the sensor device
and applies a 180-degree rotation quirk when a matching module ID is
found.
This allows platform-specific rotation handling for camera modules that
cannot be distinguished by sensor HID alone.
Link: https://github.com/intel/ipu6-drivers/pull/445
Link: https://bugs.launchpad.net/bugs/2155837
Co-developed-by: Vicamo Yang <vicamo@gmail.com>
Signed-off-by: Vicamo Yang <vicamo@gmail.com>
Signed-off-by: Jimmy Su <jimmy.su@intel.com>
---
drivers/media/pci/intel/ipu-bridge.c | 95 ++++++++++++++++++++++++----
1 file changed, 82 insertions(+), 13 deletions(-)
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index 1bb3a3e98d6b..64caa4254e41 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -36,6 +36,15 @@
*/
#define IVSC_DEV_NAME "intel_vsc"
+/*
+ * 822ace8f-2814-4174-a56b-5f029fe079ee
+ * This _DSM GUID returns a string from the sensor device, which acts as a
+ * module identifier.
+ */
+static const guid_t sensor_module_guid =
+ GUID_INIT(0x822ace8f, 0x2814, 0x4174,
+ 0xa5, 0x6b, 0x5f, 0x02, 0x9f, 0xe0, 0x79, 0xee);
+
/*
* Extend this array with ACPI Hardware IDs of devices known to be working
* plus the number of link-frequencies expected by their drivers, along with
@@ -105,6 +114,36 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
IPU_SENSOR_CONFIG("XMCC0003", 1, 321468000),
};
+/*
+ * Upside-down orientation can be determined by the Sensor HID or module ID.
+ * Camera modules from different vendors may be mounted in opposite
+ * orientations.
+ */
+enum upside_down_match_type {
+ UPSIDE_DOWN_MATCH_HID = 1,
+ UPSIDE_DOWN_MATCH_DSM,
+};
+
+struct upside_down_match_info {
+ enum upside_down_match_type type;
+ const char * const ids[2];
+};
+
+static struct upside_down_match_info ov02c10_match = {
+ .type = UPSIDE_DOWN_MATCH_HID,
+ .ids = { "OVTI02C1" },
+};
+
+static struct upside_down_match_info imx471_match = {
+ .type = UPSIDE_DOWN_MATCH_HID,
+ .ids = { "SONY471A" },
+};
+
+static struct upside_down_match_info ov02e10_match = {
+ .type = UPSIDE_DOWN_MATCH_HID,
+ .ids = { "OVTI02E1" },
+};
+
/*
* DMI matches for laptops which have their sensor mounted upside-down
* without reporting a rotation of 180° in neither the SSDB nor the _PLD.
@@ -115,35 +154,35 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 13 9340"),
},
- .driver_data = "OVTI02C1",
+ .driver_data = &ov02c10_match,
},
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 13 9350"),
},
- .driver_data = "OVTI02C1",
+ .driver_data = &ov02c10_match,
},
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 14 9440"),
},
- .driver_data = "OVTI02C1",
+ .driver_data = &ov02c10_match,
},
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 16 9640"),
},
- .driver_data = "OVTI02C1",
+ .driver_data = &ov02c10_match,
},
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 16 (Dell 16 Premium) DA16250"),
},
- .driver_data = "OVTI02C1",
+ .driver_data = &ov02c10_match,
},
/*
* The first four characters of DMI_BOARD_NAME identify the Lenovo
@@ -158,7 +197,7 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "21QA"),
},
- .driver_data = "SONY471A",
+ .driver_data = &imx471_match,
},
{
/* Lenovo X9-14 */
@@ -166,7 +205,7 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "21QB"),
},
- .driver_data = "SONY471A",
+ .driver_data = &imx471_match,
},
{
/* Lenovo X9-15 */
@@ -174,7 +213,7 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "21Q6"),
},
- .driver_data = "SONY471A",
+ .driver_data = &imx471_match,
},
{
/* Lenovo X9-15 */
@@ -182,7 +221,7 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "21Q7"),
},
- .driver_data = "SONY471A",
+ .driver_data = &imx471_match,
},
{
/* Samsung Galaxy Book5 Pro 360 */
@@ -190,7 +229,7 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "960QHA"),
},
- .driver_data = "OVTI02E1",
+ .driver_data = &ov02e10_match,
},
{} /* Terminating entry */
};
@@ -359,9 +398,39 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev,
/* A machine may have one entry per sensor, so check all matches. */
for (dmi_id = dmi_first_match(upside_down_sensor_dmi_ids); dmi_id;
- dmi_id = dmi_first_match(dmi_id + 1))
- if (acpi_dev_hid_match(adev, dmi_id->driver_data))
- return 180;
+ dmi_id = dmi_first_match(dmi_id + 1)) {
+ const struct upside_down_match_info *match =
+ dmi_id->driver_data;
+ union acpi_object *obj;
+ size_t i;
+
+ switch (match->type) {
+ case UPSIDE_DOWN_MATCH_HID:
+ for (i = 0; i < ARRAY_SIZE(match->ids) && match->ids[i];
+ i++)
+ if (acpi_dev_hid_match(adev, match->ids[i]))
+ return 180;
+ break;
+ case UPSIDE_DOWN_MATCH_DSM:
+ obj = acpi_evaluate_dsm_typed(adev->handle,
+ &sensor_module_guid, 0x00,
+ 0x01, NULL,
+ ACPI_TYPE_STRING);
+ if (!obj)
+ break;
+
+ for (i = 0; i < ARRAY_SIZE(match->ids) && match->ids[i];
+ i++)
+ if (!strcmp(match->ids[i],
+ obj->string.pointer)) {
+ ACPI_FREE(obj);
+ return 180;
+ }
+
+ ACPI_FREE(obj);
+ break;
+ }
+ }
switch (ssdb->degree) {
case IPU_SENSOR_ROTATION_NORMAL:
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v1 2/2] media: ipu-bridge: add upside-down quirks for Dell PA14260 & DA14260
2026-10-07 3:49 [PATCH v1 0/2] media: support upside-down camera mounting Jimmy Su
2026-10-07 3:49 ` [PATCH v1 1/2] media: ipu-bridge: extend upside-down matching with DSM module IDs Jimmy Su
@ 2026-10-07 3:49 ` Jimmy Su
1 sibling, 0 replies; 3+ messages in thread
From: Jimmy Su @ 2026-10-07 3:49 UTC (permalink / raw)
To: linux-media; +Cc: sakari.ailus, jimmy.su, serin.yeh, vicamo, sarang.sapre
Add rotation quirks for two Dell platforms:
- XPS 14 DA14260, which uses an OV08X40 sensor and can be identified
through its sensor HID.
- Dell Pro 14 Premium PA14260, which may use camera modules sharing
the same sensor HID as other systems but requiring a different
orientation. Match these modules using ACPI _DSM module identifiers
and apply a 180-degree rotation override when a matching module is
detected.
Co-developed-by: Vicamo Yang <vicamo@gmail.com>
Signed-off-by: Vicamo Yang <vicamo@gmail.com>
Signed-off-by: Jimmy Su <jimmy.su@intel.com>
---
drivers/media/pci/intel/ipu-bridge.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index 64caa4254e41..a7c71df8c7bc 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -144,6 +144,16 @@ static struct upside_down_match_info ov02e10_match = {
.ids = { "OVTI02E1" },
};
+static const struct upside_down_match_info ov08x40_match = {
+ .type = UPSIDE_DOWN_MATCH_HID,
+ .ids = { "OVTI08F4" },
+};
+
+static const struct upside_down_match_info pa14260_match = {
+ .type = UPSIDE_DOWN_MATCH_DSM,
+ .ids = { "CJFOE90_B", "BBG809N3A_B" },
+};
+
/*
* DMI matches for laptops which have their sensor mounted upside-down
* without reporting a rotation of 180° in neither the SSDB nor the _PLD.
@@ -184,6 +194,20 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
},
.driver_data = &ov02c10_match,
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 14 DA14260"),
+ },
+ .driver_data = (void *)&ov08x40_match,
+ },
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Dell Pro 14 Premium PA14260"),
+ },
+ .driver_data = (void *)&pa14260_match,
+ },
/*
* The first four characters of DMI_BOARD_NAME identify the Lenovo
* machine type/model. For example, a DMI_BOARD_NAME starting with
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-07 3:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 3:49 [PATCH v1 0/2] media: support upside-down camera mounting Jimmy Su
2026-10-07 3:49 ` [PATCH v1 1/2] media: ipu-bridge: extend upside-down matching with DSM module IDs Jimmy Su
2026-10-07 3:49 ` [PATCH v1 2/2] media: ipu-bridge: add upside-down quirks for Dell PA14260 & DA14260 Jimmy Su
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox