From caae27b76c56c0a01976081806430e783014dfe1 Mon Sep 17 00:00:00 2001
From: Kenneth Feng <kenneth.feng@amd.com>
Date: Mon, 25 Apr 2022 21:39:30 +0800
Subject: drm/amd/pm: change the soft pptable id for smu_v13_0_7
Git-commit: cbd3adaef820bf8bf5c56f791d46b6842071af3c
Patch-mainline: v5.19-rc1
References: jsc#PED-1166 jsc#PED-1168 jsc#PED-1170 jsc#PED-1218 jsc#PED-1220 jsc#PED-1222 jsc#PED-1223 jsc#PED-1225
change the soft pptable id for smu_v13_0_7 according to pptable updatde
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Patrik Jakobsson <pjakobsson@suse.de>
---
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index 65ff98a18699..2c57bc573ee8 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -210,6 +210,13 @@ int smu_v13_0_init_pptable_microcode(struct smu_context *smu)
} else {
pptable_id = smu->smu_table.boot_values.pp_table_id;
+ if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 7) &&
+ pptable_id == 3667)
+ pptable_id = 36671;
+
+ if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 7) &&
+ pptable_id == 3688)
+ pptable_id = 36881;
/*
* Temporary solution for SMU V13.0.0:
* - use 99991 signed pptable when SCPM enabled
@@ -445,9 +452,6 @@ int smu_v13_0_setup_pptable(struct smu_context *smu)
*/
if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 0))
pptable_id = 9999;
-
- if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 7))
- pptable_id = 8888;
}
/* force using vbios pptable in sriov mode */
--
2.38.1