<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);">
Would be cleaner to just add to the SMU_MAX_LEVELS_VDDC case. E.g.,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">
case SMU_MAX_LEVELS_VDDC:</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">+
case SMU_MAX_LEVELS_VDDGFX:</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">
return SMU71_MAX_LEVELS_VDDC;</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);"><br>
</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">With
that change, the patch is:</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">Reviewed-by:
Alex Deucher <alexander.deucher@amd.com></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> Friday, December 15, 2023 3:37 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 v2] 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. The correct definition is VDDC so<br>
use this.<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>
v1->v2:<br>
* s/VDDGFX/VDDC/<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..afe5e18f28db 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_VDDC;<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..b4b2a3c96679 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_VDDC;<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>