diff mbox series

[5/5] drm/i915/vlv_dsi: Skip MIPI I2C sequences on Microsoft Surface 3

Message ID 20220225214934.383168-5-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series [1/5] drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on Asus TF103C (v2) | expand

Commit Message

Hans de Goede Feb. 25, 2022, 9:49 p.m. UTC
The VBT DSI MIPI sequences of the panel on the Microsoft Surface 3
contain a couple of I2c writes to what seems to be a non existing
TI LP855x backlight controller, leading to the following errors:

i915 0000:00:02.0: [drm] mipi_exec_i2c bus 5 client-addr 0x2c reg 0x01 data 01
i2c_designware 808622C1:04: controller timed out
i915 0000:00:02.0: [drm] *ERROR* Failed to xfer payload of size (1) to reg (1)
i915 0000:00:02.0: [drm] mipi_exec_i2c bus 5 client-addr 0x2c reg 0x16 data 07
i2c_designware 808622C1:04: controller timed out
i915 0000:00:02.0: [drm] *ERROR* Failed to xfer payload of size (1) to reg (22)

Besides these errors this also causes the screen turning on to be delayed
by 2 seconds. At a DMI based quirk to ignore VBT DSI MIPI I2C writes on
the Microsoft Surface 3.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/i915/display/vlv_dsi.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
index 0ddc0c8cd4f7..9ba45a928719 100644
--- a/drivers/gpu/drm/i915/display/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
@@ -1873,6 +1873,16 @@  static void vlv_dsi_lenovo_yoga_tab2_size_fixup(struct intel_dsi *intel_dsi,
 	}
 }
 
+/*
+ * The VBT DSI MIPI sequences on the MS Surface 3 contain I2C writes to
+ * a non existing TI LP855x backlight controller which time out.
+ */
+static void vlv_dsi_ms_surface3_disable_mipi_i2c(struct intel_dsi *intel_dsi,
+						 struct drm_display_mode *fixed_mode)
+{
+	intel_dsi->i2c_bus_num = INTEL_DSI_I2C_BUS_INVALID;
+}
+
 static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = {
 	{
 		/* Asus Transformer Pad TF103C */
@@ -1896,6 +1906,14 @@  static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = {
 		},
 		.driver_data = (void *)vlv_dsi_lenovo_yoga_tab2_size_fixup,
 	},
+	{
+		/* Microsoft Surface 3 */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
+		},
+		.driver_data = (void *)vlv_dsi_ms_surface3_disable_mipi_i2c,
+	},
 	{ }
 };