Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Derek J. Clark and committed by
Ilpo Järvinen
8d0aef2b 5aefbf5b

+19 -28
+14 -15
Documentation/wmi/devices/lenovo-wmi-gamezone.rst
··· 19 19 The Gamezone Data WMI interface provides platform-profile and fan curve 20 20 settings for devices that fall under the "Gaming Series" of Lenovo devices. 21 21 It uses a notifier chain to inform other Lenovo WMI interface drivers of the 22 - current platform profile when it changes. 22 + current platform profile when it changes. The currently set profile can be 23 + determined by the user on the hardware by looking at the color of the power 24 + or profile LED, depending on the model. 23 25 24 26 The following platform profiles are supported: 25 - - low-power 26 - - balanced 27 - - balanced-performance 28 - - performance 29 - - custom 27 + - low-power, blue LED 28 + - balanced, white LED 29 + - performance, red LED 30 + - max-power, purple LED 31 + - custom, purple LED 30 32 31 - Balanced-Performance 33 + Extreme Mode 32 34 ~~~~~~~~~~~~~~~~~~~~ 33 35 Some newer Lenovo "Gaming Series" laptops have an "Extreme Mode" profile 34 - enabled in their BIOS. For these devices, the performance platform profile 35 - corresponds to the BIOS Extreme Mode, while the balanced-performance 36 - platform profile corresponds to the BIOS Performance mode. For legacy 37 - devices, the performance platform profile will correspond with the BIOS 38 - Performance mode. 36 + enabled in their BIOS. When available, this mode will be represented by the 37 + max-power platform profile. 39 38 40 - For some newer devices the "Extreme Mode" profile is incomplete in the BIOS 41 - and setting it will cause undefined behavior. A BIOS bug quirk table is 42 - provided to ensure these devices cannot set "Extreme Mode" from the driver. 39 + For a subset of these devices the "Extreme Mode" profile is incomplete in 40 + the BIOS and setting it will cause undefined behavior. A BIOS bug quirk table 41 + is provided to ensure these devices cannot set "Extreme Mode" from the driver. 43 42 44 43 Custom Profile 45 44 ~~~~~~~~~~~~~~
+5 -13
drivers/platform/x86/lenovo/wmi-gamezone.c
··· 171 171 *profile = PLATFORM_PROFILE_BALANCED; 172 172 break; 173 173 case LWMI_GZ_THERMAL_MODE_PERFORMANCE: 174 - if (priv->extreme_supported) { 175 - *profile = PLATFORM_PROFILE_BALANCED_PERFORMANCE; 176 - break; 177 - } 178 174 *profile = PLATFORM_PROFILE_PERFORMANCE; 179 175 break; 180 176 case LWMI_GZ_THERMAL_MODE_EXTREME: 181 - *profile = PLATFORM_PROFILE_PERFORMANCE; 177 + *profile = PLATFORM_PROFILE_MAX_POWER; 182 178 break; 183 179 case LWMI_GZ_THERMAL_MODE_CUSTOM: 184 180 *profile = PLATFORM_PROFILE_CUSTOM; ··· 214 218 case PLATFORM_PROFILE_BALANCED: 215 219 mode = LWMI_GZ_THERMAL_MODE_BALANCED; 216 220 break; 217 - case PLATFORM_PROFILE_BALANCED_PERFORMANCE: 221 + case PLATFORM_PROFILE_PERFORMANCE: 218 222 mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE; 219 223 break; 220 - case PLATFORM_PROFILE_PERFORMANCE: 221 - if (priv->extreme_supported) { 222 - mode = LWMI_GZ_THERMAL_MODE_EXTREME; 223 - break; 224 - } 225 - mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE; 224 + case PLATFORM_PROFILE_MAX_POWER: 225 + mode = LWMI_GZ_THERMAL_MODE_EXTREME; 226 226 break; 227 227 case PLATFORM_PROFILE_CUSTOM: 228 228 mode = LWMI_GZ_THERMAL_MODE_CUSTOM; ··· 330 338 331 339 priv->extreme_supported = lwmi_gz_extreme_supported(profile_support_ver); 332 340 if (priv->extreme_supported) 333 - set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, choices); 341 + set_bit(PLATFORM_PROFILE_MAX_POWER, choices); 334 342 335 343 return 0; 336 344 }