platform/x86: lenovo-wmi-gamezone Use max-power rather than balanced-performance

When developing the gamezone WMI drivers, "extreme mode" was matched to
the performance platform profile and "performance" was matched to the
balanced-performance platform profile, but only if extreme mode was
fully supported; otherwise performance was matched to the "performance"
platform profile. This has led to quite a bit of confusion with users
not understanding why the LED color indicating the platform profile
doesn't match their expectations.

To solve this, replace the confusing convention by using the new
max-power profile to represent "extreme mode". While add it, update the
documentation to reflect the expected LED colors in each operating mode.

Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://patch.msgid.link/20251127151605.1018026-3-derekjohn.clark@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
pull/1354/merge
Derek J. Clark 2025-11-27 07:16:04 -08:00 committed by Ilpo Järvinen
parent 5aefbf5b68
commit 8d0aef2b3a
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31
2 changed files with 19 additions and 28 deletions

View File

@ -19,27 +19,26 @@ WMI GUID ``887B54E3-DDDC-4B2C-8B88-68A26A8835D0``
The Gamezone Data WMI interface provides platform-profile and fan curve
settings for devices that fall under the "Gaming Series" of Lenovo devices.
It uses a notifier chain to inform other Lenovo WMI interface drivers of the
current platform profile when it changes.
current platform profile when it changes. The currently set profile can be
determined by the user on the hardware by looking at the color of the power
or profile LED, depending on the model.
The following platform profiles are supported:
- low-power
- balanced
- balanced-performance
- performance
- custom
- low-power, blue LED
- balanced, white LED
- performance, red LED
- max-power, purple LED
- custom, purple LED
Balanced-Performance
Extreme Mode
~~~~~~~~~~~~~~~~~~~~
Some newer Lenovo "Gaming Series" laptops have an "Extreme Mode" profile
enabled in their BIOS. For these devices, the performance platform profile
corresponds to the BIOS Extreme Mode, while the balanced-performance
platform profile corresponds to the BIOS Performance mode. For legacy
devices, the performance platform profile will correspond with the BIOS
Performance mode.
enabled in their BIOS. When available, this mode will be represented by the
max-power platform profile.
For some newer devices the "Extreme Mode" profile is incomplete in the BIOS
and setting it will cause undefined behavior. A BIOS bug quirk table is
provided to ensure these devices cannot set "Extreme Mode" from the driver.
For a subset of these devices the "Extreme Mode" profile is incomplete in
the BIOS and setting it will cause undefined behavior. A BIOS bug quirk table
is provided to ensure these devices cannot set "Extreme Mode" from the driver.
Custom Profile
~~~~~~~~~~~~~~

View File

@ -171,14 +171,10 @@ static int lwmi_gz_profile_get(struct device *dev,
*profile = PLATFORM_PROFILE_BALANCED;
break;
case LWMI_GZ_THERMAL_MODE_PERFORMANCE:
if (priv->extreme_supported) {
*profile = PLATFORM_PROFILE_BALANCED_PERFORMANCE;
break;
}
*profile = PLATFORM_PROFILE_PERFORMANCE;
break;
case LWMI_GZ_THERMAL_MODE_EXTREME:
*profile = PLATFORM_PROFILE_PERFORMANCE;
*profile = PLATFORM_PROFILE_MAX_POWER;
break;
case LWMI_GZ_THERMAL_MODE_CUSTOM:
*profile = PLATFORM_PROFILE_CUSTOM;
@ -218,15 +214,11 @@ static int lwmi_gz_profile_set(struct device *dev,
case PLATFORM_PROFILE_BALANCED:
mode = LWMI_GZ_THERMAL_MODE_BALANCED;
break;
case PLATFORM_PROFILE_BALANCED_PERFORMANCE:
case PLATFORM_PROFILE_PERFORMANCE:
mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE;
break;
case PLATFORM_PROFILE_PERFORMANCE:
if (priv->extreme_supported) {
mode = LWMI_GZ_THERMAL_MODE_EXTREME;
break;
}
mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE;
case PLATFORM_PROFILE_MAX_POWER:
mode = LWMI_GZ_THERMAL_MODE_EXTREME;
break;
case PLATFORM_PROFILE_CUSTOM:
mode = LWMI_GZ_THERMAL_MODE_CUSTOM;
@ -338,7 +330,7 @@ static int lwmi_gz_platform_profile_probe(void *drvdata, unsigned long *choices)
priv->extreme_supported = lwmi_gz_extreme_supported(profile_support_ver);
if (priv->extreme_supported)
set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, choices);
set_bit(PLATFORM_PROFILE_MAX_POWER, choices);
return 0;
}