aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0479-drm-amd-powerplay-fix-fan-speed-percent-setting-erro.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0479-drm-amd-powerplay-fix-fan-speed-percent-setting-erro.patch')
-rw-r--r--common/recipes-kernel/linux/files/0479-drm-amd-powerplay-fix-fan-speed-percent-setting-erro.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0479-drm-amd-powerplay-fix-fan-speed-percent-setting-erro.patch b/common/recipes-kernel/linux/files/0479-drm-amd-powerplay-fix-fan-speed-percent-setting-erro.patch
new file mode 100644
index 00000000..a414dcd4
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0479-drm-amd-powerplay-fix-fan-speed-percent-setting-erro.patch
@@ -0,0 +1,31 @@
+From 1c8d1b39c9dc09a04add29781db119ed9a042744 Mon Sep 17 00:00:00 2001
+From: Eric Huang <JinHuiEric.Huang@amd.com>
+Date: Mon, 11 Apr 2016 14:27:51 -0400
+Subject: [PATCH 0479/1110] drm/amd/powerplay: fix fan speed percent setting
+ error on Tonga
+
+Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
+index 23f8463..47ef1ca 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c
+@@ -195,8 +195,8 @@ int tonga_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr, uint32_t speed)
+ if (0 == duty100)
+ return -EINVAL;
+
+- tmp64 = (uint64_t)speed * 100;
+- do_div(tmp64, duty100);
++ tmp64 = (uint64_t)speed * duty100;
++ do_div(tmp64, 100);
+ duty = (uint32_t)tmp64;
+
+ PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, CG_FDO_CTRL0, FDO_STATIC_DUTY, duty);
+--
+2.7.4
+