All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
	lsanche@lyndeno.ca, hdegoede@redhat.com,
	ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, Patil.Reddy@amd.com,
	Yijun Shen <Yijun.Shen@Dell.com>
Subject: Re: [PATCH v2] platform/x86/dell: Set USTT mode according to BIOS after reboot
Date: Tue, 16 Sep 2025 08:15:50 -0500	[thread overview]
Message-ID: <907c1952-5aea-42f3-9a13-71e2044d406e@kernel.org> (raw)
In-Reply-To: <20250916115142.188535-1-Shyam-sundar.S-k@amd.com>

On 9/16/25 6:51 AM, Shyam Sundar S K wrote:
> 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: Mario Limonciello (AMD) <superm1@kernel.org>> ---
>   drivers/platform/x86/dell/dell-pc.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> 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;
>   }
>   


  reply	other threads:[~2025-09-16 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16 11:51 [PATCH v2] platform/x86/dell: Set USTT mode according to BIOS after reboot Shyam Sundar S K
2025-09-16 13:15 ` Mario Limonciello [this message]
2025-09-16 18:15   ` Lyndon Sanche
2025-09-18  6:50     ` Shen, Yijun
2025-09-18 11:00       ` Ilpo Järvinen
2025-09-18 13:27         ` Shen, Yijun
2025-09-23  9:27 ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=907c1952-5aea-42f3-9a13-71e2044d406e@kernel.org \
    --to=superm1@kernel.org \
    --cc=Patil.Reddy@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=Yijun.Shen@Dell.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=lsanche@lyndeno.ca \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.