Skip to content

Commit 8d0aef2

Browse files
pastaqij-intel
authored andcommitted
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>
1 parent 5aefbf5 commit 8d0aef2

2 files changed

Lines changed: 20 additions & 29 deletions

File tree

Documentation/wmi/devices/lenovo-wmi-gamezone.rst

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,26 @@ WMI GUID ``887B54E3-DDDC-4B2C-8B88-68A26A8835D0``
1919
The Gamezone Data WMI interface provides platform-profile and fan curve
2020
settings for devices that fall under the "Gaming Series" of Lenovo devices.
2121
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.
2325

2426
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
3032

31-
Balanced-Performance
33+
Extreme Mode
3234
~~~~~~~~~~~~~~~~~~~~
3335
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.
39-
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.
36+
enabled in their BIOS. When available, this mode will be represented by the
37+
max-power platform profile.
38+
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.
4342

4443
Custom Profile
4544
~~~~~~~~~~~~~~

drivers/platform/x86/lenovo/wmi-gamezone.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,10 @@ static int lwmi_gz_profile_get(struct device *dev,
171171
*profile = PLATFORM_PROFILE_BALANCED;
172172
break;
173173
case LWMI_GZ_THERMAL_MODE_PERFORMANCE:
174-
if (priv->extreme_supported) {
175-
*profile = PLATFORM_PROFILE_BALANCED_PERFORMANCE;
176-
break;
177-
}
178174
*profile = PLATFORM_PROFILE_PERFORMANCE;
179175
break;
180176
case LWMI_GZ_THERMAL_MODE_EXTREME:
181-
*profile = PLATFORM_PROFILE_PERFORMANCE;
177+
*profile = PLATFORM_PROFILE_MAX_POWER;
182178
break;
183179
case LWMI_GZ_THERMAL_MODE_CUSTOM:
184180
*profile = PLATFORM_PROFILE_CUSTOM;
@@ -218,16 +214,12 @@ static int lwmi_gz_profile_set(struct device *dev,
218214
case PLATFORM_PROFILE_BALANCED:
219215
mode = LWMI_GZ_THERMAL_MODE_BALANCED;
220216
break;
221-
case PLATFORM_PROFILE_BALANCED_PERFORMANCE:
222-
mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE;
223-
break;
224217
case PLATFORM_PROFILE_PERFORMANCE:
225-
if (priv->extreme_supported) {
226-
mode = LWMI_GZ_THERMAL_MODE_EXTREME;
227-
break;
228-
}
229218
mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE;
230219
break;
220+
case PLATFORM_PROFILE_MAX_POWER:
221+
mode = LWMI_GZ_THERMAL_MODE_EXTREME;
222+
break;
231223
case PLATFORM_PROFILE_CUSTOM:
232224
mode = LWMI_GZ_THERMAL_MODE_CUSTOM;
233225
break;
@@ -338,7 +330,7 @@ static int lwmi_gz_platform_profile_probe(void *drvdata, unsigned long *choices)
338330

339331
priv->extreme_supported = lwmi_gz_extreme_supported(profile_support_ver);
340332
if (priv->extreme_supported)
341-
set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, choices);
333+
set_bit(PLATFORM_PROFILE_MAX_POWER, choices);
342334

343335
return 0;
344336
}

0 commit comments

Comments
 (0)