diff options
| author | Shyam Sundar S K <[email protected]> | 2025-09-16 11:51:42 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-09-23 09:06:31 +0000 |
| commit | 2c61c45af153243baf591a77ec187be2b9cfe302 (patch) | |
| tree | 1093cb794f24c5cce180e3c66323059829697509 | |
| parent | platform/x86/amd/pmc: Add Stellaris Slim Gen6 AMD to spurious 8042 quirks list (diff) | |
| download | kernel-2c61c45af153243baf591a77ec187be2b9cfe302.tar.gz kernel-2c61c45af153243baf591a77ec187be2b9cfe302.zip | |
platform/x86/dell: Set USTT mode according to BIOS after reboot
After a reboot, if the user changes the thermal setting in the BIOS, the
BIOS applies this change. However, the current `dell-pc` driver does not
recognize the updated USTT value, resulting in inconsistent thermal
profiles between Windows and Linux.
To ensure alignment with Windows behavior, read the current USTT settings
during driver initialization and update the dell-pc USTT profile
accordingly whenever a change is detected.
Cc: Yijun Shen <[email protected]>
Co-developed-by: Patil Rajesh Reddy <[email protected]>
Signed-off-by: Patil Rajesh Reddy <[email protected]>
Signed-off-by: Shyam Sundar S K <[email protected]>
Reviewed-by: Lyndon Sanche <[email protected]>
Reviewed-by: Mario Limonciello (AMD) <[email protected]>
Tested-By: Yijun Shen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
| -rw-r--r-- | drivers/platform/x86/dell/dell-pc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/platform/x86/dell/dell-pc.c b/drivers/platform/x86/dell/dell-pc.c index 48cc7511905a..becdd9aaef29 100644 --- a/drivers/platform/x86/dell/dell-pc.c +++ b/drivers/platform/x86/dell/dell-pc.c @@ -228,6 +228,8 @@ static int thermal_platform_profile_get(struct device *dev, static int thermal_platform_profile_probe(void *drvdata, unsigned long *choices) { + int current_mode; + if (supported_modes & DELL_QUIET) __set_bit(PLATFORM_PROFILE_QUIET, choices); if (supported_modes & DELL_COOL_BOTTOM) @@ -237,6 +239,13 @@ static int thermal_platform_profile_probe(void *drvdata, unsigned long *choices) if (supported_modes & DELL_PERFORMANCE) __set_bit(PLATFORM_PROFILE_PERFORMANCE, choices); + /* Make sure that ACPI is in sync with the profile set by USTT */ + current_mode = thermal_get_mode(); + if (current_mode < 0) + return current_mode; + + thermal_set_mode(current_mode); + return 0; } |
