drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x

It has been confirmed that the SMU metrics table should always reflect
the current fan speed even in manual mode.

Fixes: f6eb433954 ("drm/amdgpu/swsmu: handle manual fan readback on SMU11")
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher
2020-10-26 17:40:42 -04:00
parent 19cc89dcb9
commit 4f00d6d5ba

View File

@ -1361,14 +1361,9 @@ static int navi10_get_fan_speed_rpm(struct smu_context *smu,
if (!speed) if (!speed)
return -EINVAL; return -EINVAL;
switch (smu_v11_0_get_fan_control_mode(smu)) { return navi10_get_smu_metrics_data(smu,
case AMD_FAN_CTRL_AUTO: METRICS_CURR_FANSPEED,
return navi10_get_smu_metrics_data(smu, speed);
METRICS_CURR_FANSPEED,
speed);
default:
return smu_v11_0_get_fan_speed_rpm(smu, speed);
}
} }
static int navi10_get_fan_parameters(struct smu_context *smu) static int navi10_get_fan_parameters(struct smu_context *smu)