<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:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</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> Quan, Evan <Evan.Quan@amd.com><br>
<b>Sent:</b> Monday, February 7, 2022 10:20 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH 7/7] drm/amd/pm: fix some OEM SKU specific stability issues</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Add a quirk in sienna_cichlid_ppt.c to fix some OEM SKU<br>
specific stability issues.<br>
<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
Change-Id: I172c6429c54253788dbf28f7acf877375f2bfc5b<br>
---<br>
 .../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c   | 32 ++++++++++++++++++-<br>
 1 file changed, 31 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c<br>
index a7bb5358d4a4..f964af05f376 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c<br>
@@ -428,6 +428,36 @@ static int sienna_cichlid_store_powerplay_table(struct smu_context *smu)<br>
         return 0;<br>
 }<br>
 <br>
+static int sienna_cichlid_patch_pptable_quirk(struct smu_context *smu)<br>
+{<br>
+       struct amdgpu_device *adev = smu->adev;<br>
+       uint32_t *board_reserved;<br>
+       uint16_t *freq_table_gfx;<br>
+       uint32_t i;<br>
+<br>
+       /* Fix some OEM SKU specific stability issues */<br>
+       GET_PPTABLE_MEMBER(BoardReserved, &board_reserved);<br>
+       if ((adev->pdev->device == 0x73DF) &&<br>
+           (adev->pdev->revision == 0XC3) &&<br>
+           (adev->pdev->subsystem_device == 0x16C2) &&<br>
+           (adev->pdev->subsystem_vendor == 0x1043))<br>
+               board_reserved[0] = 1387;<br>
+<br>
+       GET_PPTABLE_MEMBER(FreqTableGfx, &freq_table_gfx);<br>
+       if ((adev->pdev->device == 0x73DF) &&<br>
+           (adev->pdev->revision == 0XC3) &&<br>
+           ((adev->pdev->subsystem_device == 0x16C2) ||<br>
+           (adev->pdev->subsystem_device == 0x133C)) &&<br>
+           (adev->pdev->subsystem_vendor == 0x1043)) {<br>
+               for (i = 0; i < NUM_GFXCLK_DPM_LEVELS; i++) {<br>
+                       if (freq_table_gfx[i] > 2500)<br>
+                               freq_table_gfx[i] = 2500;<br>
+               }<br>
+       }<br>
+<br>
+       return 0;<br>
+}<br>
+<br>
 static int sienna_cichlid_setup_pptable(struct smu_context *smu)<br>
 {<br>
         int ret = 0;<br>
@@ -448,7 +478,7 @@ static int sienna_cichlid_setup_pptable(struct smu_context *smu)<br>
         if (ret)<br>
                 return ret;<br>
 <br>
-       return ret;<br>
+       return sienna_cichlid_patch_pptable_quirk(smu);<br>
 }<br>
 <br>
 static int sienna_cichlid_tables_init(struct smu_context *smu)<br>
-- <br>
2.29.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>