Commit f6eb4339 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/swsmu: handle manual fan readback on SMU11

Need to read back from registers for manual mode rather than
using the metrics table.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1164Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9a7fd013
...@@ -1123,9 +1123,14 @@ static int arcturus_get_fan_speed_rpm(struct smu_context *smu, ...@@ -1123,9 +1123,14 @@ static int arcturus_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)) {
case AMD_FAN_CTRL_AUTO:
return arcturus_get_smu_metrics_data(smu, return arcturus_get_smu_metrics_data(smu,
METRICS_CURR_FANSPEED, METRICS_CURR_FANSPEED,
speed); speed);
default:
return smu_v11_0_get_fan_speed_rpm(smu, speed);
}
} }
static int arcturus_get_fan_parameters(struct smu_context *smu) static int arcturus_get_fan_parameters(struct smu_context *smu)
......
...@@ -1362,9 +1362,14 @@ static int navi10_get_fan_speed_rpm(struct smu_context *smu, ...@@ -1362,9 +1362,14 @@ 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)) {
case AMD_FAN_CTRL_AUTO:
return navi10_get_smu_metrics_data(smu, return navi10_get_smu_metrics_data(smu,
METRICS_CURR_FANSPEED, METRICS_CURR_FANSPEED,
speed); 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)
......
...@@ -1169,9 +1169,14 @@ static int sienna_cichlid_get_fan_speed_rpm(struct smu_context *smu, ...@@ -1169,9 +1169,14 @@ static int sienna_cichlid_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)) {
case AMD_FAN_CTRL_AUTO:
return sienna_cichlid_get_smu_metrics_data(smu, return sienna_cichlid_get_smu_metrics_data(smu,
METRICS_CURR_FANSPEED, METRICS_CURR_FANSPEED,
speed); speed);
default:
return smu_v11_0_get_fan_speed_rpm(smu, speed);
}
} }
static int sienna_cichlid_get_fan_parameters(struct smu_context *smu) static int sienna_cichlid_get_fan_parameters(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