aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2098-drm-amd-powerplay-wrong-control-mode-cause-the-fan-s.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2098-drm-amd-powerplay-wrong-control-mode-cause-the-fan-s.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2098-drm-amd-powerplay-wrong-control-mode-cause-the-fan-s.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2098-drm-amd-powerplay-wrong-control-mode-cause-the-fan-s.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2098-drm-amd-powerplay-wrong-control-mode-cause-the-fan-s.patch
new file mode 100644
index 00000000..2540b098
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2098-drm-amd-powerplay-wrong-control-mode-cause-the-fan-s.patch
@@ -0,0 +1,42 @@
+From 82f8d374b9c87bb8c85dd6c3d1ea6097bc71ecb3 Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Wed, 1 Nov 2017 16:52:08 +0800
+Subject: [PATCH 2098/4131] drm/amd/powerplay: wrong control mode cause the fan
+ spins faster unnecessarily
+
+The fan control mode can either be FDO_PWM_MODE_STATIC or FDO_PWM_MODE_STATIC_RPM.
+Setting it as AMD_FAN_CTRL_AUTO will cause the fan spin faster wrongly.
+
+This can be reproduced by:
+'# cat /sys/class/hwmon/hwmon0/pwm1
+ 38
+'# cat /sys/class/hwmon/hwmon0/pwm1_enable
+ 2
+'# echo "2" > /sys/class/hwmon/hwmon0/pwm1_enable
+'# cat /sys/class/hwmon/hwmon0/pwm1
+ 122
+The fan speed get faster wronly even with its original mode echo back.
+
+Change-Id: I51b0586ac17e0d663925c87d548847b31c79d68a
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+index 511812e..9d3516c 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+@@ -4237,7 +4237,7 @@ static void vega10_set_fan_control_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
+ vega10_fan_ctrl_stop_smc_fan_control(hwmgr);
+ break;
+ case AMD_FAN_CTRL_AUTO:
+- if (!vega10_fan_ctrl_set_static_mode(hwmgr, mode))
++ if (PP_CAP(PHM_PlatformCaps_MicrocodeFanControl))
+ vega10_fan_ctrl_start_smc_fan_control(hwmgr);
+ break;
+ default:
+--
+2.7.4
+