diff options
author | Eric Huang <JinHuiEric.Huang@amd.com> | 2016-04-11 14:26:12 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-04 20:29:43 -0400 |
commit | 51224389543ebd7307e09f0f46e5c5cac417d940 (patch) | |
tree | e9ca38053e49a5247555231bdc3dd72f18118244 | |
parent | 681ed01c62915656b9807f25e23f18c0d77ad786 (diff) |
drm/amd/powerplay: fix fan speed percent setting error on Polaris10
The logic was reversed.
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/polaris10_thermal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c index d2f553d61c3d..d39c89bbdab0 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c | |||
@@ -220,8 +220,8 @@ int polaris10_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr, | |||
220 | if (duty100 == 0) | 220 | if (duty100 == 0) |
221 | return -EINVAL; | 221 | return -EINVAL; |
222 | 222 | ||
223 | tmp64 = (uint64_t)speed * 100; | 223 | tmp64 = (uint64_t)speed * duty100; |
224 | do_div(tmp64, duty100); | 224 | do_div(tmp64, 100); |
225 | duty = (uint32_t)tmp64; | 225 | duty = (uint32_t)tmp64; |
226 | 226 | ||
227 | PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, | 227 | PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, |