<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">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</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 Kenneth Feng <kenneth.feng@amd.com><br>
<b>Sent:</b> Friday, December 7, 2018 1:13:20 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Feng, Kenneth<br>
<b>Subject:</b> [PATCH v2] drm/amdgpu/powerplay: Apply avfs cks-off voltages on VI</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Instead of EVV cks-off voltages, avfs cks-off voltages can avoid<br>
the overshoot voltages when switching sclk.<br>
<br>
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com><br>
---<br>
 drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h          | 2 ++<br>
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 ++++++<br>
 2 files changed, 8 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h b/drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h<br>
index 62f36ba..c1a99df 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h<br>
+++ b/drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h<br>
@@ -386,6 +386,8 @@ typedef uint16_t PPSMC_Result;<br>
 #define PPSMC_MSG_AgmResetPsm                 ((uint16_t) 0x403)<br>
 #define PPSMC_MSG_ReadVftCell                 ((uint16_t) 0x404)<br>
 <br>
+#define PPSMC_MSG_ApplyAvfsCksOffVoltage      ((uint16_t) 0x415)<br>
+<br>
 #define PPSMC_MSG_GFX_CU_PG_ENABLE            ((uint16_t) 0x280)<br>
 #define PPSMC_MSG_GFX_CU_PG_DISABLE           ((uint16_t) 0x281)<br>
 #define PPSMC_MSG_GetCurrPkgPwr               ((uint16_t) 0x282)<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
index 94898b2..d2b97aa 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
@@ -1997,6 +1997,12 @@ int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)<br>
 <br>
         smum_send_msg_to_smc(hwmgr, PPSMC_MSG_EnableAvfs);<br>
 <br>
+       /* Apply avfs cks-off voltages to avoid the overshoot<br>
+        * when switching to the highest sclk frequency<br>
+        */<br>
+       if (data->apply_avfs_cks_off_voltage)<br>
+               smum_send_msg_to_smc(hwmgr, PPSMC_MSG_ApplyAvfsCksOffVoltage);<br>
+<br>
         return 0;<br>
 }<br>
 <br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>