[PATCH v2] drm/amd: Add missing definitions for `SMU_MAX_LEVELS_VDDGFX`

Deucher, Alexander Alexander.Deucher at amd.com
Fri Dec 15 22:29:05 UTC 2023


[Public]

Would be cleaner to just add to the SMU_MAX_LEVELS_VDDC case.  E.g.,

       case SMU_MAX_LEVELS_VDDC:
+       case SMU_MAX_LEVELS_VDDGFX:
               return SMU71_MAX_LEVELS_VDDC;

With that change, the patch is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Mario Limonciello <mario.limonciello at amd.com>
Sent: Friday, December 15, 2023 3:37 PM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Limonciello, Mario <Mario.Limonciello at amd.com>
Subject: [PATCH v2] drm/amd: Add missing definitions for `SMU_MAX_LEVELS_VDDGFX`

It is reported that on a Topaz dGPU the kernel emits:
        amdgpu: can't get the mac of 5

This is because there is no definition for max levels of VDDGFX
declared for SMU71 or SMU7. The correct definition is VDDC so
use this.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3049
Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
v1->v2:
 * s/VDDGFX/VDDC/
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c      | 2 ++
 drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
index 9e4228232f02..afe5e18f28db 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
@@ -2303,6 +2303,8 @@ static uint32_t ci_get_mac_definition(uint32_t value)
                 return SMU7_MAX_LEVELS_VDDCI;
         case SMU_MAX_LEVELS_MVDD:
                 return SMU7_MAX_LEVELS_MVDD;
+       case SMU_MAX_LEVELS_VDDGFX:
+               return SMU7_MAX_LEVELS_VDDC;
         }

         pr_debug("can't get the mac of %x\n", value);
diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
index 97d9802fe673..b4b2a3c96679 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
@@ -2268,6 +2268,8 @@ static uint32_t iceland_get_mac_definition(uint32_t value)
                 return SMU71_MAX_LEVELS_VDDCI;
         case SMU_MAX_LEVELS_MVDD:
                 return SMU71_MAX_LEVELS_MVDD;
+       case SMU_MAX_LEVELS_VDDGFX:
+               return SMU71_MAX_LEVELS_VDDC;
         }

         pr_warn("can't get the mac of %x\n", value);
--
2.34.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20231215/84e10b01/attachment.htm>


More information about the amd-gfx mailing list