Skip to contentSkip to conversation

drm: panel-orientation-quirks: Make Lenovo Yoga Tab 3 X90F DMI match less strict

PATCH In review Hans de Goede 2 participants 2 messages Aug 25, 2024 – Aug 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: panel-orientation-quirks: Make Lenovo Yoga Tab 3 X90F DMI match less strict

There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it turns out that the 2G version has a DMI product name of "CHERRYVIEW D1 PLATFORM" where as the 4G version has "CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are unique enough that the product-name check is not necessary.

Drop the product-name check so that the existing DMI match for the 4G RAM version also matches the 2G RAM version.

---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/drm_panel_orientation_quirks.c +0 -1
index c16c7678237e..c48471c09e2f 100644
@@ -391,7 +391,6 @@ static const struct dmi_system_id orientation_data[] = {
 	}, {	/* Lenovo Yoga Tab 3 X90F */
 		.matches = {
 		 DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
-		 DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
 		 DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
 		},
 		.driver_data = (void *)&lcd1600x2560_rightside_up,
Signature · 1 line
2.46.0
Acked-by on v1 1/1
#1 lore raw
Quoted 19 lines · Hans de Goede

There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it turns out that the 2G version has a DMI product name of "CHERRYVIEW D1 PLATFORM" where as the 4G version has "CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are unique enough that the product-name check is not necessary.

Drop the product-name check so that the existing DMI match for the 4G RAM version also matches the 2G RAM version.

---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/drm_panel_orientation_quirks.c +0 -0
index c16c7678237e..c48471c09e2f 100644

drivers/gpu/drm/drm_panel_orientation_quirks.c static const struct dmi_system_id orientation_data[] = { · line 394

Quoted 4 lines
drivers/gpu/drm/drm_panel_orientation_quirks.c +0 -1
@@ -391,7 +391,6 @@ static const struct dmi_system_id orientation_data[] = {
 	}, {	/* Lenovo Yoga Tab 3 X90F */
 		.matches = {
 		 DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
-		 DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),

DMI_MATCH uses strstr() internally (as opposed to DMI_EXACT_MATCH which is a full strcmp()) so you could still have

DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW"),

Up to you, and either way,

Quoted 3 lines
drivers/gpu/drm/drm_panel_orientation_quirks.c +0 -0
 		 DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
 		},
 		.driver_data = (void *)&lcd1600x2560_rightside_up,
Signature · 1 line
Jani Nikula, Intel