Commit 9f5b6cfd authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher
Browse files

drm/amd/pm: drop unnecessary manual mode check



As the fan control was guarded under manual mode before fan speed
RPM/PWM setting. Thus the extra check is totally redundant.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 448b8ef0
......@@ -1186,9 +1186,6 @@ smu_v11_0_set_fan_speed_percent(struct smu_context *smu, uint32_t speed)
if (speed > 255)
speed = 255;
if (smu_v11_0_auto_fan_control(smu, 0))
return -EINVAL;
duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1),
CG_FDO_CTRL1, FMAX_DUTY100);
if (!duty100)
......@@ -1210,11 +1207,6 @@ int smu_v11_0_set_fan_speed_rpm(struct smu_context *smu,
{
struct amdgpu_device *adev = smu->adev;
uint32_t tach_period, crystal_clock_freq;
int ret;
ret = smu_v11_0_auto_fan_control(smu, 0);
if (ret)
return ret;
/*
* crystal_clock_freq div by 4 is required since the fan control
......@@ -1228,9 +1220,7 @@ int smu_v11_0_set_fan_speed_rpm(struct smu_context *smu,
CG_TACH_CTRL, TARGET_PERIOD,
tach_period));
ret = smu_v11_0_set_fan_static_mode(smu, FDO_PWM_MODE_STATIC_RPM);
return ret;
return smu_v11_0_set_fan_static_mode(smu, FDO_PWM_MODE_STATIC_RPM);
}
int smu_v11_0_get_fan_speed_percent(struct smu_context *smu,
......
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