drm/amdgpu/pm: add missing revision check for CI
Subsystems (3)
Alex Deucher
maintainerPATCH 1/2 drm/amdgpu/pm: add missing revision check for CI
The ci_populate_all_memory_levels() workaround only applies to revision 0 SKUs.
--- drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +3 -2
@@ -1333,8 +1333,9 @@ static int ci_populate_all_memory_levels(struct pp_hwmgr *hwmgr) dev_id = adev->pdev->device; -if ((dpm_table->mclk_table.count >=2 ) - && ((dev_id ==0x67B0 ) || (dev_id ==0x67B1 ))) { +if ((dpm_table->mclk_table.count >=2 ) && + ((dev_id ==0x67B0 ) || (dev_id ==0x67B1 )) && + (adev->pdev->revision ==0 )) { smu_data->smc_state_table.MemoryLevel[1 ].MinVddci = smu_data->smc_state_table.MemoryLevel[0 ].MinVddci; smu_data->smc_state_table.MemoryLevel[1].MinMvdd =
Signature · 1 line
2.53.0
Alex Deucher
maintainerPATCH 2/2 drm/radeon: add missing revision check for CI
The memory level workarounds only apply to revision 0 SKUs.
--- drivers/gpu/drm/radeon/ci_dpm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/ci_dpm.c +6 -3
@@ -2461,7 +2461,8 @@ static void ci_register_patching_mc_arb(struct radeon_device *rdev,if (patch && ((rdev->pdev->device ==0x67B0 ) || - (rdev->pdev->device ==0x67B1 ))) { + (rdev->pdev->device ==0x67B1 )) && + (rdev->pdev->revision ==0 )) {if ((memory_clock >100000 ) && (memory_clock <=125000 )) { tmp2 = (((0x31 * engine_clock) /125000 ) -1 ) &0xff ; *dram_timimg2 &= ~0x00ff0000 ;
@@ -3304,7 +3305,8 @@ static int ci_populate_all_memory_levels(struct radeon_device *rdev) pi->smc_state_table.MemoryLevel[0 ].EnabledForActivity =1 ;if ((dpm_table->mclk_table.count >=2 ) && - ((rdev->pdev->device ==0x67B0 ) || (rdev->pdev->device ==0x67B1 ))) { + ((rdev->pdev->device ==0x67B0 ) || (rdev->pdev->device ==0x67B1 )) && + (rdev->pdev->revision ==0 )) { pi->smc_state_table.MemoryLevel[1 ].MinVddc = pi->smc_state_table.MemoryLevel[0 ].MinVddc; pi->smc_state_table.MemoryLevel[1].MinVddcPhases =
@@ -4493,7 +4495,8 @@ static int ci_register_patching_mc_seq(struct radeon_device *rdev,if (patch && ((rdev->pdev->device ==0x67B0 ) || - (rdev->pdev->device ==0x67B1 ))) { + (rdev->pdev->device ==0x67B1 )) && + (rdev->pdev->revision ==0 )) {for (i =0 ; i < table->last; i++) {if (table->last >=SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE )return -EINVAL ;
Signature · 1 line
2.53.0
RE: [PATCH 2/2] drm/radeon: add missing revision check for CI
AMD General
Series is
Quoted 55 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, April 27, 2026 1:31 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 2/2] drm/radeon: add missing revision check for CIThe memory level workarounds only apply to revision 0 SKUs.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/ci_dpm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/gpu/drm/radeon/ci_dpm.c +2
-1@@ -2461,7 +2461,8 @@ static void ci_register_patching_mc_arb(struct radeon_device *rdev, if (patch && ((rdev->pdev->device ==0x67B0 ) || - (rdev->pdev->device == 0x67B1))) { + (rdev->pdev->device ==0x67B1 )) && + (rdev->pdev->revision == 0)) {if ((memory_clock >100000 ) && (memory_clock <=125000 )) { tmp2 = (((0x31 * engine_clock) /125000 ) -1 ) &0xff ;*dram_timimg2 &= ~0x00ff0000;drivers/gpu/drm/radeon/ci_dpm.c +2
-1@@ -3304,7 +3305,8 @@ static int ci_populate_all_memory_levels(struct radeon_device *rdev) pi->smc_state_table.MemoryLevel[0].EnabledForActivity = 1;if ((dpm_table->mclk_table.count >=2 ) && - ((rdev->pdev->device ==0x67B0 ) || (rdev->pdev->device ==0x67B1 ))) { + ((rdev->pdev->device ==0x67B0 ) || (rdev->pdev->device ==0x67B1 )) && + (rdev->pdev->revision ==0 )) { pi->smc_state_table.MemoryLevel[1 ].MinVddc = pi->smc_state_table.MemoryLevel[0 ].MinVddc;pi->smc_state_table.MemoryLevel[1].MinVddcPhases =drivers/gpu/drm/radeon/ci_dpm.c +2
-1@@ -4493,7 +4495,8 @@ static int ci_register_patching_mc_seq(struct radeon_device *rdev, if (patch && ((rdev->pdev->device ==0x67B0 ) || - (rdev->pdev->device == 0x67B1))) { + (rdev->pdev->device ==0x67B1 )) && + (rdev->pdev->revision == 0)) {for (i =0 ; i < table->last; i++) { if (table->last >=
SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE)return -EINVAL;--
2.53.0
Re: [PATCH 2/2] drm/radeon: add missing revision check for CI
In reply to Alex DeucherQuoted 3 lines · Central European Summer Time Alex Deucher
The memory level workarounds only apply to revision 0 SKUs.
Signed-off-by Alex Deucher <[email protected]>
It is important that stable kernels (and stable distros) pick up this patch. Can you please add a few tags to this commit to give extra context?
hawaii")
With that, this patch is also:
Thanks & best regards,
Timur
Quoted 9 lines
--- drivers/gpu/drm/radeon/ci_dpm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/radeon/ci_dpm.cindexba8db1d07c070..b47b91272b244100644
drivers/gpu/drm/radeon/ci_dpm.c static void ci_register_patching_mc_arb(struct · line 2467
Quoted 8 lines
drivers/gpu/drm/radeon/ci_dpm.c +2
-1@@ -2461,7 +2461,8 @@ static void ci_register_patching_mc_arb(struct radeon_device *rdev, if (patch && ((rdev->pdev->device ==0x67B0 ) || - (rdev->pdev->device == 0x67B1))) { + (rdev->pdev->device ==0x67B1 )) && + (rdev->pdev->revision == 0)) { if ((memory_clock > 100000) && (memory_clock <=
125000)) {
drivers/gpu/drm/radeon/ci_dpm.c static void ci_register_patching_mc_arb(struct · line 2468
Quoted 1 line
drivers/gpu/drm/radeon/ci_dpm.c +0
-0tmp2 = (((0x31 * engine_clock) / 125000) -
1) & 0xff;
drivers/gpu/drm/radeon/ci_dpm.c
Quoted 7 lines
drivers/gpu/drm/radeon/ci_dpm.c +0
-0*dram_timimg2 &= ~0x00ff0000 ;@@ -3304,7 +3305,8 @@ static int ci_populate_all_memory_levels(struct
radeon_device*rdev) pi->smc_state_table.MemoryLevel[0].EnabledForActivity = 1;drivers/gpu/drm/radeon/ci_dpm.c +0
-1if ((dpm_table->mclk_table.count >= 2) && - ((rdev->pdev->device == 0x67B0) || (rdev->pdev->device ==
0x67B1))) {
drivers/gpu/drm/radeon/ci_dpm.c
Quoted 1 line
drivers/gpu/drm/radeon/ci_dpm.c +1
-0+ ((rdev->pdev->device == 0x67B0) || (rdev->pdev->device ==
0x67B1)) &&
Quoted 5 lines
drivers/gpu/drm/radeon/ci_dpm.c +1
-0+ (rdev->pdev->revision == 0)) { pi->smc_state_table.MemoryLevel[1 ].MinVddc = pi->smc_state_table.MemoryLevel[0 ].MinVddc; pi->smc_state_table.MemoryLevel[1].MinVddcPhases =
drivers/gpu/drm/radeon/ci_dpm.c static int ci_register_patching_mc_seq(struct · line 4502
Quoted 9 lines
drivers/gpu/drm/radeon/ci_dpm.c +2
-1@@ -4493,7 +4495,8 @@ static int ci_register_patching_mc_seq(struct radeon_device *rdev, if (patch && ((rdev->pdev->device ==0x67B0 ) || - (rdev->pdev->device == 0x67B1))) { + (rdev->pdev->device ==0x67B1 )) && + (rdev->pdev->revision == 0)) {for (i =0 ; i < table->last; i++) { if (table->last >=
SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE)
Quoted 1 line
return
-EINVAL;
Hi Alex,
Quoted 2 lines · Central European Summer Time Alex Deucher
The
ci_populate_all_memory_levels()workaround only applies to revision 0 SKUs.
This makes good sense. Looking at issue 1816, seems that the affected GPU is revision 80, and looking at my Hawaii card, it seems to be also 80:
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ ATI] Hawaii XT / Grenada XT [Radeon R9 290X/390X] [1002:67b0] (rev 80) (prog- if 00 [VGA controller])
Can you please add a few tags for additional context?
Quoted 23 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.cindex69d8b05ef2457..6e89a032e3dcf100644drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +3
-2@@ -1333,8 +1333,9 @@ static int ci_populate_all_memory_levels(struct pp_hwmgr *hwmgr) dev_id = adev->pdev->device; -if ((dpm_table->mclk_table.count >=2 ) - && ((dev_id ==0x67B0 ) || (dev_id ==0x67B1 ))) { +if ((dpm_table->mclk_table.count >=2 ) && + ((dev_id ==0x67B0 ) || (dev_id ==0x67B1 )) && + (adev->pdev->revision ==0 )) { smu_data->smc_state_table.MemoryLevel[1 ].MinVddci = smu_data-
Quoted 2 lines
smc_state_table.MemoryLevel[0].MinVddci;
smu_data->smc_state_table.MemoryLevel[1].MinMvdd =
It looks like amdgpu and radeon behave differently here: radeon overwrites the MinVddc and MinVddcPhases vs. amdgpu overwrites MinVddci and MinMvdd.
Without knowing more details of what the workaround was trying to achieve, it's hard to judge whether radeon or amdgpu was correct, but it would be nice to make them consistent. If radeon was correct, could you adjust the amdgpu code here to do the same? (Or vice versa if amdgpu was correct.)
With that, the series is:
Thanks & best regards,
Timur