Skip to contentSkip to conversation

drm/amd: Add missing definitions for `SMU_MAX_LEVELS_VDDGFX`

PATCH Superseded Mario Limonciello 2 participants 2 messages Dec 14, 2023 – Dec 15, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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. There is however an unused definition of VDDNB. Use this to return the max levels for VDDGFX.

---
 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(+)
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +2 -0
index 9e4228232f02..c5bccd382196 100644
@@ -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_VDDNB;
 	}
 
 	pr_debug("can't get the mac of %x\n", value);
drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c +2 -0
index 97d9802fe673..c9115eaa63c4 100644
@@ -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_VDDNB;
 	}
 
 	pr_warn("can't get the mac of %x\n", value);
Signature · 1 line
2.34.1
#1 lore raw

[Public]

VDDGFX should be matched to VDDC (e.g, SMU7_MAX_LEVELS_VDDC).

Alex
________________________________
From: amd-gfx <[email protected]> on behalf of Mario Limonciello <[email protected]>
Sent: Thursday, December 14, 2023 4:11 PM
To: [email protected] <[email protected]>
Cc: Limonciello, Mario <[email protected]>
Subject: [PATCH] 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. There is however an unused definition of VDDNB. Use this to return the max levels for VDDGFX.

---
 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(+)
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +2 -0
index 9e4228232f02..c5bccd382196 100644
@@ -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_VDDNB;
         }
 
         pr_debug("can't get the mac of %x\n", value);
drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c +2 -0
index 97d9802fe673..c9115eaa63c4 100644
@@ -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_VDDNB;
         }
 
         pr_warn("can't get the mac of %x\n", value);

--
2.34.1