From: Armin Wolf <W_Armin@gmx.de>
To: corentin.chary@gmail.com, luke@ljones.dev, mohamed.ghanmi@supcom.tn
Cc: srinivas.pandruvada@linux.intel.com, hdegoede@redhat.com,
ilpo.jarvinen@linux.intel.com, Michael@phoronix.com,
casey.g.bowman@intel.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] platform/x86: asus-wmi: Fix thermal profile initialization
Date: Fri, 25 Oct 2024 21:15:13 +0200 [thread overview]
Message-ID: <20241025191514.15032-2-W_Armin@gmx.de> (raw)
In-Reply-To: <20241025191514.15032-1-W_Armin@gmx.de>
When support for vivobook fan profiles was added, the initial
call to throttle_thermal_policy_set_default() was removed, which
however is necessary for full initialization.
Fix this by calling throttle_thermal_policy_set_default() again
when setting up the platform profile.
Fixes: bcbfcebda2cb ("platform/x86: asus-wmi: add support for vivobook fan profiles")
Reported-by: Michael Larabel <Michael@phoronix.com>
Closes: https://www.phoronix.com/review/lunar-lake-xe2/5
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/platform/x86/asus-wmi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 2ccc23b259d3..ab9342a01a48 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -3908,6 +3908,16 @@ static int platform_profile_setup(struct asus_wmi *asus)
if (!asus->throttle_thermal_policy_dev)
return 0;
+ /*
+ * We need to set the default thermal profile during probe or otherwise
+ * the system will often remain in silent mode, causing low performance.
+ */
+ err = throttle_thermal_policy_set_default(asus);
+ if (err < 0) {
+ pr_warn("Failed to set default thermal profile\n");
+ return err;
+ }
+
dev_info(dev, "Using throttle_thermal_policy for platform_profile support\n");
asus->platform_profile_handler.profile_get = asus_wmi_platform_profile_get;
--
2.39.5
next prev parent reply other threads:[~2024-10-25 19:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 19:15 [PATCH 0/2] platform/x86: asus-wmi: Fix thermal profile handling Armin Wolf
2024-10-25 19:15 ` Armin Wolf [this message]
2024-10-26 4:23 ` [PATCH 1/2] platform/x86: asus-wmi: Fix thermal profile initialization srinivas pandruvada
2024-10-25 19:15 ` [PATCH 2/2] platform/x86: asus-wmi: Fix inconsistent use of thermal policies Armin Wolf
2024-10-26 9:56 ` Hans de Goede
2024-10-26 11:49 ` Armin Wolf
2024-10-26 10:45 ` Mohamed Ghanmi
2024-10-26 10:59 ` Hans de Goede
2024-10-26 11:55 ` Armin Wolf
2024-10-26 11:53 ` Armin Wolf
2024-10-26 4:09 ` [PATCH 0/2] platform/x86: asus-wmi: Fix thermal profile handling srinivas pandruvada
2024-10-29 1:19 ` Bowman, Casey G
2024-10-26 9:53 ` Hans de Goede
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=20241025191514.15032-2-W_Armin@gmx.de \
--to=w_armin@gmx.de \
--cc=Michael@phoronix.com \
--cc=casey.g.bowman@intel.com \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=mohamed.ghanmi@supcom.tn \
--cc=platform-driver-x86@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®