summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Huang <JinHuiEric.Huang@amd.com>2016-04-11 20:28:55 +0200
committerAlex Deucher <alexander.deucher@amd.com>2016-05-05 02:20:46 +0200
commit9331b9ca813960ed05004821a771aa3a82db187c (patch)
treec91b27878d4504d4f3cb8609e961617eef79ccf0
parentdrm/amd/powerplay: fix fan speed percent setting error on Tonga (diff)
downloadlinux-9331b9ca813960ed05004821a771aa3a82db187c.tar.xz
linux-9331b9ca813960ed05004821a771aa3a82db187c.zip
drm/amd/powerplay: fix fan speed percent setting error on Fiji
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>
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
index e2b448f49334..92976b68d6fd 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c
@@ -221,8 +221,8 @@ int fiji_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
if (duty100 == 0)
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,