AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu/pm: add missing revision check for CI
@ 2026-04-27 17:31 Alex Deucher
  2026-04-27 17:31 ` [PATCH 2/2] drm/radeon: " Alex Deucher
  2026-04-28 10:20 ` [PATCH 1/2] drm/amdgpu/pm: " Timur Kristóf
  0 siblings, 2 replies; 5+ messages in thread
From: Alex Deucher @ 2026-04-27 17:31 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

The ci_populate_all_memory_levels() workaround only
applies to revision 0 SKUs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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 69d8b05ef2457..6e89a032e3dcf 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
@@ -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 =
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] drm/radeon: add missing revision check for CI
  2026-04-27 17:31 [PATCH 1/2] drm/amdgpu/pm: add missing revision check for CI Alex Deucher
@ 2026-04-27 17:31 ` Alex Deucher
  2026-04-27 18:22   ` Russell, Kent
  2026-04-28 10:29   ` Timur Kristóf
  2026-04-28 10:20 ` [PATCH 1/2] drm/amdgpu/pm: " Timur Kristóf
  1 sibling, 2 replies; 5+ messages in thread
From: Alex Deucher @ 2026-04-27 17:31 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

The memory level workarounds only apply to revision 0 SKUs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/ci_dpm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
index ba8db1d07c070..b47b91272b244 100644
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -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;
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH 2/2] drm/radeon: add missing revision check for CI
  2026-04-27 17:31 ` [PATCH 2/2] drm/radeon: " Alex Deucher
@ 2026-04-27 18:22   ` Russell, Kent
  2026-04-28 10:29   ` Timur Kristóf
  1 sibling, 0 replies; 5+ messages in thread
From: Russell, Kent @ 2026-04-27 18:22 UTC (permalink / raw)
  To: Deucher, Alexander, amd-gfx@lists.freedesktop.org; +Cc: Deucher, Alexander

AMD General

Series is
Reviewed-by: Kent Russell <kent.russell@amd.com>



> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Monday, April 27, 2026 1:31 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: [PATCH 2/2] drm/radeon: add missing revision check for CI
>
> The memory level workarounds only apply to revision 0 SKUs.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/radeon/ci_dpm.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
> index ba8db1d07c070..b47b91272b244 100644
> --- a/drivers/gpu/drm/radeon/ci_dpm.c
> +++ b/drivers/gpu/drm/radeon/ci_dpm.c
> @@ -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;
> --
> 2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu/pm: add missing revision check for CI
  2026-04-27 17:31 [PATCH 1/2] drm/amdgpu/pm: add missing revision check for CI Alex Deucher
  2026-04-27 17:31 ` [PATCH 2/2] drm/radeon: " Alex Deucher
@ 2026-04-28 10:20 ` Timur Kristóf
  1 sibling, 0 replies; 5+ messages in thread
From: Timur Kristóf @ 2026-04-28 10:20 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, Alex Deucher

Hi Alex,

On Monday, April 27, 2026 7:31:02 PM Central European Summer Time Alex Deucher 
wrote:
> 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?
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/1816
Fixes: 9f4b35411cfe ("drm/amd/powerplay: add CI asics support to smumgr (v3)")

> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> 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
> 69d8b05ef2457..6e89a032e3dcf 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> @@ -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 =

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:
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>

Thanks & best regards,
Timur




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] drm/radeon: add missing revision check for CI
  2026-04-27 17:31 ` [PATCH 2/2] drm/radeon: " Alex Deucher
  2026-04-27 18:22   ` Russell, Kent
@ 2026-04-28 10:29   ` Timur Kristóf
  1 sibling, 0 replies; 5+ messages in thread
From: Timur Kristóf @ 2026-04-28 10:29 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, Alex Deucher

On Monday, April 27, 2026 7:31:03 PM Central European Summer Time Alex Deucher 
wrote:
> The memory level workarounds only apply to revision 0 SKUs.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

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?

Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/1816
Fixes: 127e056e2a82 ("drm/radeon: fix mclk vddc configuration for cards for 
hawaii")
Fixes: 21b8a369046f ("drm/radeon: fix dram timing for certain hawaii boards")
Fixes: 90b2fee35cb9 ("drm/radeon: fix dpm mc init for certain hawaii boards")

With that, this patch is also:
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>

Thanks & best regards,
Timur

> ---
>  drivers/gpu/drm/radeon/ci_dpm.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/ci_dpm.c
> b/drivers/gpu/drm/radeon/ci_dpm.c index ba8db1d07c070..b47b91272b244 100644
> --- a/drivers/gpu/drm/radeon/ci_dpm.c
> +++ b/drivers/gpu/drm/radeon/ci_dpm.c
> @@ -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;





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-28 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 17:31 [PATCH 1/2] drm/amdgpu/pm: add missing revision check for CI Alex Deucher
2026-04-27 17:31 ` [PATCH 2/2] drm/radeon: " Alex Deucher
2026-04-27 18:22   ` Russell, Kent
2026-04-28 10:29   ` Timur Kristóf
2026-04-28 10:20 ` [PATCH 1/2] drm/amdgpu/pm: " Timur Kristóf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox