aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
diff options
context:
space:
mode:
authorYang Wang <[email protected]>2022-06-10 11:48:04 +0800
committerAlex Deucher <[email protected]>2022-06-21 17:55:32 -0400
commit51c45e450fc8529495bc85c2d8e309816cdcf959 (patch)
treeaba9638ad2cd268d2a36bb7944232984105dfb00 /drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
parent8748de873fedf4d55bdd99bbb738ee7ddf329792 (diff)
drm/amd/pm: skip to set mp1 unload state in special case
set mp1 unload state will cause the SMC FW can't accept any SMU message, skip to set mp1 unload state to avoid following case fail: - runtime pm case. - gpu reset case. Fixes: 72aeb6ee0c78 ("drm/amd/pm: fix driver reload SMC firmware fail issue for smu13") Signed-off-by: Yang Wang <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 3d269d1c2749..fd79b213fab4 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -1415,12 +1415,13 @@ static int smu_disable_dpms(struct smu_context *smu)
switch (adev->ip_versions[MP1_HWIP][0]) {
case IP_VERSION(13, 0, 0):
case IP_VERSION(13, 0, 7):
- ret = smu_set_mp1_state(smu, PP_MP1_STATE_UNLOAD);
- if (ret) {
- dev_err(adev->dev, "Fail set mp1 state to UNLOAD!\n");
- return ret;
+ if (!(adev->in_runpm || amdgpu_in_reset(adev))) {
+ ret = smu_set_mp1_state(smu, PP_MP1_STATE_UNLOAD);
+ if (ret) {
+ dev_err(adev->dev, "Fail set mp1 state to UNLOAD!\n");
+ return ret;
+ }
}
-
return 0;
default:
break;