Skip to content

Commit f6f4a08

Browse files
committed
drm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo Yoga Tab 3 (v2)
On the Lenovo Yoga Tab 3 Pro YT3-X90F there are 2 issues with the backlight on/off MIPI sequences: 1. The backlight on sequence has an I2C MIPI sequence element which uses bus 0, but there is a bogus I2cSerialBus resource under the GPU in the DSDT which causes i2c_acpi_find_adapter() to pick the wrong bus. 2. There is no backlight off sequence, causing the backlight to stay on. Add a DMI quirk fixing both issues. v2: - Add Closes tag to gitlab issue with drm.debug=0xe, VBT info Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9380 Signed-off-by: Hans de Goede <[email protected]> Acked-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2cac4ed commit f6f4a08

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

drivers/gpu/drm/i915/display/vlv_dsi.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,6 +1805,31 @@ static void vlv_dsi_lenovo_yoga_tab2_size_fixup(struct intel_dsi *intel_dsi)
18051805
}
18061806
}
18071807

1808+
/*
1809+
* On the Lenovo Yoga Tab 3 Pro YT3-X90F there are 2 problems:
1810+
* 1. i2c_acpi_find_adapter() picks the wrong adapter causing mipi_exec_i2c()
1811+
* to not work. Fix this by setting i2c_bus_num.
1812+
* 2. There is no backlight off MIPI sequence, causing the backlight to stay on.
1813+
* Add a backlight off sequence mirroring the existing backlight on sequence.
1814+
*
1815+
* https://gitlab.freedesktop.org/drm/intel/-/issues/9380
1816+
*/
1817+
static void vlv_dsi_lenovo_yoga_tab3_backlight_fixup(struct intel_dsi *intel_dsi)
1818+
{
1819+
static const u8 backlight_off_sequence[16] = {
1820+
/* Header Seq-id 7, length after header 11 bytes */
1821+
0x07, 0x0b, 0x00, 0x00, 0x00,
1822+
/* MIPI_SEQ_ELEM_I2C bus 0 addr 0x2c reg 0x00 data-len 1 data 0x00 */
1823+
0x04, 0x08, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x01, 0x00,
1824+
/* MIPI_SEQ_ELEM_END */
1825+
0x00
1826+
};
1827+
struct intel_connector *connector = intel_dsi->attached_connector;
1828+
1829+
intel_dsi->i2c_bus_num = 0;
1830+
connector->panel.vbt.dsi.sequence[MIPI_SEQ_BACKLIGHT_OFF] = backlight_off_sequence;
1831+
}
1832+
18081833
static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = {
18091834
{
18101835
/* Asus Transformer Pad TF103C */
@@ -1828,6 +1853,15 @@ static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = {
18281853
},
18291854
.driver_data = (void *)vlv_dsi_lenovo_yoga_tab2_size_fixup,
18301855
},
1856+
{
1857+
/* Lenovo Yoga Tab 3 Pro YT3-X90F */
1858+
.matches = {
1859+
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
1860+
DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
1861+
DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
1862+
},
1863+
.driver_data = (void *)vlv_dsi_lenovo_yoga_tab3_backlight_fixup,
1864+
},
18311865
{ }
18321866
};
18331867

0 commit comments

Comments
 (0)