Commit f5bd5239 authored by Ryan Taylor's avatar Ryan Taylor Committed by Alex Deucher

drm/amd/pm: graceful exit on restore fan mode failure (v2)

Attempt od settings restore and disable restore flag on restore fan mode
failure.

v2: Update fan mode to auto and fan speed to zero (Lijo)
Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRyan Taylor <Ryan.Taylor@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5d58f1a5
...@@ -407,11 +407,12 @@ static void smu_restore_dpm_user_profile(struct smu_context *smu) ...@@ -407,11 +407,12 @@ static void smu_restore_dpm_user_profile(struct smu_context *smu)
smu->user_dpm_profile.fan_mode == AMD_FAN_CTRL_NONE) { smu->user_dpm_profile.fan_mode == AMD_FAN_CTRL_NONE) {
ret = smu_set_fan_control_mode(smu, smu->user_dpm_profile.fan_mode); ret = smu_set_fan_control_mode(smu, smu->user_dpm_profile.fan_mode);
if (ret) { if (ret) {
smu->user_dpm_profile.fan_speed_percent = 0;
smu->user_dpm_profile.fan_mode = AMD_FAN_CTRL_AUTO;
dev_err(smu->adev->dev, "Failed to set manual fan control mode\n"); dev_err(smu->adev->dev, "Failed to set manual fan control mode\n");
return;
} }
if (!ret && smu->user_dpm_profile.fan_speed_percent) { if (smu->user_dpm_profile.fan_speed_percent) {
ret = smu_set_fan_speed_percent(smu, smu->user_dpm_profile.fan_speed_percent); ret = smu_set_fan_speed_percent(smu, smu->user_dpm_profile.fan_speed_percent);
if (ret) if (ret)
dev_err(smu->adev->dev, "Failed to set manual fan speed\n"); dev_err(smu->adev->dev, "Failed to set manual fan speed\n");
......
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