<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;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[Public]<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);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; color: rgb(0, 0, 0);">VDDGFX should be matched to VDDC (e.g, SMU7_MAX_LEVELS_VDDC).</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; color: rgb(0, 0, 0);"><br>
</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; color: rgb(0, 0, 0);">Alex</span></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 Mario Limonciello <mario.limonciello@amd.com><br>
<b>Sent:</b> Thursday, December 14, 2023 4:11 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Limonciello, Mario <Mario.Limonciello@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd: Add missing definitions for `SMU_MAX_LEVELS_VDDGFX`</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">It is reported that on a Topaz dGPU the kernel emits:<br>
amdgpu: can't get the mac of 5<br>
<br>
This is because there is no definition for max levels of VDDGFX<br>
declared for SMU71 or SMU7. There is however an unused definition of<br>
VDDNB. Use this to return the max levels for VDDGFX.<br>
<br>
Link: <a href="https://gitlab.freedesktop.org/drm/amd/-/issues/3049">https://gitlab.freedesktop.org/drm/amd/-/issues/3049</a><br>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com><br>
---<br>
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2 ++<br>
drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 2 ++<br>
2 files changed, 4 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c<br>
index 9e4228232f02..c5bccd382196 100644<br>
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c<br>
@@ -2303,6 +2303,8 @@ static uint32_t ci_get_mac_definition(uint32_t value)<br>
return SMU7_MAX_LEVELS_VDDCI;<br>
case SMU_MAX_LEVELS_MVDD:<br>
return SMU7_MAX_LEVELS_MVDD;<br>
+ case SMU_MAX_LEVELS_VDDGFX:<br>
+ return SMU7_MAX_LEVELS_VDDNB;<br>
}<br>
<br>
pr_debug("can't get the mac of %x\n", value);<br>
diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c<br>
index 97d9802fe673..c9115eaa63c4 100644<br>
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c<br>
@@ -2268,6 +2268,8 @@ static uint32_t iceland_get_mac_definition(uint32_t value)<br>
return SMU71_MAX_LEVELS_VDDCI;<br>
case SMU_MAX_LEVELS_MVDD:<br>
return SMU71_MAX_LEVELS_MVDD;<br>
+ case SMU_MAX_LEVELS_VDDGFX:<br>
+ return SMU71_MAX_LEVELS_VDDNB;<br>
}<br>
<br>
pr_warn("can't get the mac of %x\n", value);<br>
-- <br>
2.34.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>