lkml.org 
[lkml]   [2019]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 3/3] asus_wmi: Set default fan boost mode to normal
Date
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 | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 4f9c0b99f352..e6565b4e7ed7 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1675,6 +1675,15 @@ static int fan_boost_mode_write(struct asus_wmi *asus)
return 0;
}

+static int fan_boost_mode_set_default(struct asus_wmi *asus)
+{
+ if (!asus->fan_boost_mode_available)
+ return 0;
+
+ asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_NORMAL;
+ return fan_boost_mode_write(asus);
+}
+
static int fan_boost_mode_switch_next(struct asus_wmi *asus)
{
u8 mask = asus->fan_boost_mode_mask;
@@ -2451,6 +2460,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)
--
2.23.0
\
 
 \ /
  Last update: 2019-11-08 17:48    [W:0.063 / U:9.632 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site