Skip to content

Commit 2c61c45

Browse files
Shyam Sundar S Kij-intel
authored andcommitted
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 <Yijun.Shen@Dell.com> Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Reviewed-by: Lyndon Sanche <lsanche@lyndeno.ca> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Tested-By: Yijun Shen <Yijun.Shen@Dell.com> Link: https://patch.msgid.link/20250916115142.188535-1-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 12a3dd4 commit 2c61c45

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

drivers/platform/x86/dell/dell-pc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ static int thermal_platform_profile_get(struct device *dev,
228228

229229
static int thermal_platform_profile_probe(void *drvdata, unsigned long *choices)
230230
{
231+
int current_mode;
232+
231233
if (supported_modes & DELL_QUIET)
232234
__set_bit(PLATFORM_PROFILE_QUIET, choices);
233235
if (supported_modes & DELL_COOL_BOTTOM)
@@ -237,6 +239,13 @@ static int thermal_platform_profile_probe(void *drvdata, unsigned long *choices)
237239
if (supported_modes & DELL_PERFORMANCE)
238240
__set_bit(PLATFORM_PROFILE_PERFORMANCE, choices);
239241

242+
/* Make sure that ACPI is in sync with the profile set by USTT */
243+
current_mode = thermal_get_mode();
244+
if (current_mode < 0)
245+
return current_mode;
246+
247+
thermal_set_mode(current_mode);
248+
240249
return 0;
241250
}
242251

0 commit comments

Comments
 (0)