[PATCH V2 3/3] drm/amd/pm: disable cstate feature during smu cleanup
Evan Quan
evan.quan at amd.com
Wed Oct 12 06:32:55 UTC 2022
This can address some reset failures observed on SMU13.0.0.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
Change-Id: Ieb4e204c49abd405b1dce559c2ff75bb3887b6f9
--
v1->v2:
- revise the code comments(Alex)
- limit this to SMU13.0.0 and 13.0.7
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 13c5c7f1ecb9..b0310b2e24f8 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -1443,13 +1443,20 @@ static int smu_disable_dpms(struct smu_context *smu)
((adev->in_runpm || adev->in_s4) && amdgpu_asic_supports_baco(adev)));
/*
- * For SMU 13.0.0 and 13.0.7, PMFW will handle the DPM features(disablement or others)
- * properly on suspend/reset/unload. Driver involvement may cause some unexpected issues.
+ * For SMU 13.0.0 and 13.0.7, per PMFW team's suggestion,
+ * driver needs to disable gfxoff and df cstate features(this
+ * can address some mode1 reset failures). For other features,
+ * PMFW will handle them properly.
*/
switch (adev->ip_versions[MP1_HWIP][0]) {
case IP_VERSION(13, 0, 0):
case IP_VERSION(13, 0, 7):
- return 0;
+ if (smu->ppt_funcs->set_df_cstate) {
+ ret = smu->ppt_funcs->set_df_cstate(smu, DF_CSTATE_DISALLOW);
+ if (ret)
+ dev_err(smu->adev->dev, "[SetDfCstate] failed!\n");
+ }
+ return ret;
default:
break;
}
--
2.34.1
More information about the amd-gfx
mailing list