From: Ryan Taylor <Ryan.Taylor@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Ryan Taylor <Ryan.Taylor@amd.com>, Lijo Lazar <lijo.lazar@amd.com>
Subject: [PATCH 2/2] drm/amd/pm: graceful exit on restore fan mode failure (v2)
Date: Tue, 10 Aug 2021 12:15:28 -0700 [thread overview]
Message-ID: <20210810191528.23430-2-Ryan.Taylor@amd.com> (raw)
In-Reply-To: <20210810191528.23430-1-Ryan.Taylor@amd.com>
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: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Ryan Taylor <Ryan.Taylor@amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index b4b4d615bcbc..00d594e6dd85 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -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) {
ret = smu_set_fan_control_mode(smu, smu->user_dpm_profile.fan_mode);
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");
- 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);
if (ret)
dev_err(smu->adev->dev, "Failed to set manual fan speed\n");
--
2.32.0
next prev parent reply other threads:[~2021-08-10 19:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 19:15 [PATCH 1/2] drm/amd/pm: restore fan_mode AMD_FAN_CTRL_NONE on resume (v2) Ryan Taylor
2021-08-10 19:15 ` Ryan Taylor [this message]
2021-08-10 19:20 ` [PATCH 2/2] drm/amd/pm: graceful exit on restore fan mode failure (v2) Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210810191528.23430-2-Ryan.Taylor@amd.com \
--to=ryan.taylor@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=lijo.lazar@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox