<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Calibri;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - AMD Internal Distribution Only]<br>
</p>
<br>
<div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Lijo Lazar <lijo.lazar@amd.com><br>
<b>Sent:</b> Thursday, August 22, 2024 12:20 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Zhang, Hawking <Hawking.Zhang@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Kamal, Asad <Asad.Kamal@amd.com>; Kamal, Asad <Asad.Kamal@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/pm: Add support for new P2S table revision</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Add p2s table support for a new revision of SMUv13.0.6.<br>
<br>
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com><br>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com><br>
Reviewed-by: Asad Kamal <asad.kamal@amd.com><br>
---<br>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 7 ++++++-<br>
1 file changed, 6 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c<br>
index 7cea0862dcbb..ece1ffc1e56d 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c<br>
@@ -121,6 +121,7 @@ struct mca_ras_info {<br>
<br>
#define P2S_TABLE_ID_A 0x50325341<br>
#define P2S_TABLE_ID_X 0x50325358<br>
+#define P2S_TABLE_ID_3 0x50325303<br>
<br>
// clang-format off<br>
static const struct cmn2asic_msg_mapping smu_v13_0_6_message_map[SMU_MSG_MAX_COUNT] = {<br>
@@ -279,14 +280,18 @@ static int smu_v13_0_6_init_microcode(struct smu_context *smu)<br>
struct amdgpu_device *adev = smu->adev;<br>
uint32_t p2s_table_id = P2S_TABLE_ID_A;<br>
int ret = 0, i, p2stable_count;<br>
+ int var = (adev->pdev->device & 0xF);<br>
char ucode_prefix[15];<br>
<br>
/* No need to load P2S tables in IOV mode */<br>
if (amdgpu_sriov_vf(adev))<br>
return 0;<br>
<br>
- if (!(adev->flags & AMD_IS_APU))<br>
+ if (!(adev->flags & AMD_IS_APU)) {<br>
p2s_table_id = P2S_TABLE_ID_X;<br>
+ if (var == 0x5)<br>
+ p2s_table_id = P2S_TABLE_ID_3;<br>
+ }<br>
<br>
amdgpu_ucode_ip_version_decode(adev, MP1_HWIP, ucode_prefix,<br>
sizeof(ucode_prefix));<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>