Commit 51224389 authored by Eric Huang's avatar Eric Huang Committed by Alex Deucher

drm/amd/powerplay: fix fan speed percent setting error on Polaris10

The logic was reversed.
Signed-off-by: default avatarEric Huang <JinHuiEric.Huang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 681ed01c
...@@ -220,8 +220,8 @@ int polaris10_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr, ...@@ -220,8 +220,8 @@ int polaris10_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
if (duty100 == 0) if (duty100 == 0)
return -EINVAL; return -EINVAL;
tmp64 = (uint64_t)speed * 100; tmp64 = (uint64_t)speed * duty100;
do_div(tmp64, duty100); do_div(tmp64, 100);
duty = (uint32_t)tmp64; duty = (uint32_t)tmp64;
PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment