From: Leonid Maksymchuk <leonmaxx@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org,
acpi4asus-user@lists.sourceforge.net, chiu@endlessm.com,
yurii.pavlovskyi@gmail.com, kristian@klausen.dk,
andy@infradead.org, dvhart@infradead.org,
corentin.chary@gmail.com
Subject: [RFC PATCH 3/3] platform/x86: asus_wmi: Set default fan boost mode to normal
Date: Mon, 4 Nov 2019 20:29:07 +0200 [thread overview]
Message-ID: <a0494561-3e48-d777-f228-e6dbe580f48a@gmail.com> (raw)
In-Reply-To: <d3dbac09-3c93-c695-ae52-4b599a0a78c6@gmail.com>
Set default fan boost mode to normal for multiple reasons:
1) existing code assumes that laptop started in normal mode and that is
not always correct.
2) FX705DY/FX505DY starts in silent mode and under heavy CPU load it
overheats and drops CPU frequency to 399MHz [1]. Setting fan mode to
normal avoids overheating.
[1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=203733
Signed-off-by: Leonid Maksymchuk <leonmaxx@gmail.com>
---
drivers/platform/x86/asus-wmi.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index f4e5840..70c5fbb 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1674,6 +1674,18 @@ static int fan_boost_mode_write(struct asus_wmi *asus)
return 0;
}
+static int fan_boost_mode_set_default(struct asus_wmi *asus)
+{
+ int result = 0;
+
+ if (asus->fan_boost_mode_available) {
+ asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_NORMAL;
+ result = fan_boost_mode_write(asus);
+ }
+
+ return result;
+}
+
static int fan_boost_mode_switch_next(struct asus_wmi *asus)
{
u8 mask = asus->fan_boost_mode_mask;
@@ -2450,6 +2462,7 @@ static int asus_wmi_add(struct platform_device *pdev)
err = fan_boost_mode_check_present(asus);
if (err)
goto fail_fan_boost_mode;
+ fan_boost_mode_set_default(asus);
err = asus_wmi_sysfs_init(asus->platform_device);
if (err)
--
1.8.3.1
next prev parent reply other threads:[~2019-11-04 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 18:11 [RFC PATCH 0/3] asus_wmi: Support of ASUS TUF laptops on Ryzen CPUs Leonid Maksymchuk
2019-11-04 18:26 ` [RFC PATCH 1/3] platform/x86: asus_wmi: Fix return value of fan_boost_mode_store Leonid Maksymchuk
2019-11-04 18:28 ` [RFC PATCH 2/3] platform/x86: asus_wmi: Support fan boost mode on FX505DY/FX705DY Leonid Maksymchuk
2019-11-04 18:29 ` Leonid Maksymchuk [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-11-04 10:52 [RFC PATCH 0/3] asus_wmi: Support of ASUS TUF laptops on Ryzen CPUs Leon Maxx
2019-11-04 10:55 ` [RFC PATCH 3/3] platform/x86: asus_wmi: Set default fan boost mode to normal Leon Maxx
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=a0494561-3e48-d777-f228-e6dbe580f48a@gmail.com \
--to=leonmaxx@gmail.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=andy@infradead.org \
--cc=chiu@endlessm.com \
--cc=corentin.chary@gmail.com \
--cc=dvhart@infradead.org \
--cc=kristian@klausen.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=yurii.pavlovskyi@gmail.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®