Skip to contentSkip to conversation

drm/amdgpu/powerplay: fix mclk switch limit on polaris

PATCH In review Alex Deucher 2 participants 5 messages Dec 3, 2018 – Dec 4, 2018 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu/powerplay: fix mclk switch limit on polaris

Update switch limit on newer polaris variants. This may fix flickering with high refresh rates with mclk switching enabled.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +4 -1
index 5dcd21d29dbf..1f12fc7ea7c9 100644
@@ -2859,7 +2859,10 @@ static int smu7_vblank_too_short(struct pp_hwmgr *hwmgr,
 	case CHIP_POLARIS10:
 	case CHIP_POLARIS11:
 	case CHIP_POLARIS12:
-		switch_limit_us = data->is_memory_gddr5 ? 190 : 150;
+		if (hwmgr->is_kicker)
+			switch_limit_us = data->is_memory_gddr5 ? 450 : 150;
+		else
+			switch_limit_us = data->is_memory_gddr5 ? 190 : 150;
 		break;
 	case CHIP_VEGAM:
 		switch_limit_us = 30;
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20181203162106.2910-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 2/2 drm/amdgpu/powerplay: fix clock stretcher limits on polaris

Adjust limits for newer polaris variants.

---
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +15 -2
index 2b2c26616902..1f8736b8291d 100644
@@ -1528,8 +1528,21 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
 	efuse = efuse >> 24;
 
 	if (hwmgr->chip_id == CHIP_POLARIS10) {
-		min = 1000;
-		max = 2300;
+		if (hwmgr->is_kicker) {
+			min = 1200;
+			max = 2500;
+		} else {
+			min = 1000;
+			max = 2300;
+		}
+	} else if (hwmgr->chip_id == CHIP_POLARIS11) {
+		if (hwmgr->is_kicker) {
+			min = 900;
+			max = 2500;
+		} else {
+			min = 1100;
+			max = 2100;
+		}
 	} else {
 		min = 1100;
 		max = 2100;
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20181203162106.2910-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by Junwei Zhang
#4 lore raw

Re: [PATCH 2/2] drm/amdgpu/powerplay: fix clock stretcher limits on polaris

Quoted 18 lines · Alex Deucher

Adjust limits for newer polaris variants.

---
  drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 17 +++++++++++++++--
  1 file changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +1 -2
index 2b2c26616902..1f8736b8291d 100644
@@ -1528,8 +1528,21 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
  	efuse = efuse >> 24;
 
  	if (hwmgr->chip_id == CHIP_POLARIS10) {
-		min = 1000;
-		max = 2300;
+		if (hwmgr->is_kicker) {

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr) · line 1541

Quoted 10 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +10 -0
+			min = 1200;
+			max = 2500;
+		} else {
+			min = 1000;
+			max = 2300;
+		}
+	} else if (hwmgr->chip_id == CHIP_POLARIS11) {
+		if (hwmgr->is_kicker) {
+			min = 900;
+			max = 2500;

the max is 2100, I think.

Apart from that, it's

Regards,
Jerry

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr) · line 1548

Quoted 7 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +4 -0
+		} else {
+			min = 1100;
+			max = 2100;
+		}
  	} else {
  		min = 1100;
  		max = 2100;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 419b2140-ef5d-1767-2638-eb4b4bdc20e8-5C7GfCeVMHo@public.gmane.org

#6 lore raw

Re: [PATCH 2/2] drm/amdgpu/powerplay: fix clock stretcher limits on polaris

Quoted 16 lines · Jerry(Junwei)
Quoted 14 lines · Alex Deucher

Adjust limits for newer polaris variants.

---
  drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 17 +++++++++++++++--
  1 file changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +0 -0
index 2b2c26616902..1f8736b8291d 100644
@@ -1528,8 +1528,21 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
      efuse = efuse >> 24;
 
Quoted 16 lines
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +1 -2
      if (hwmgr->chip_id == CHIP_POLARIS10) {
-             min = 1000;
-             max = 2300;
+             if (hwmgr->is_kicker) {

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr) · line 1541

Quoted 10 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +10 -0
+                     min = 1200;
+                     max = 2500;
+             } else {
+                     min = 1000;
+                     max = 2300;
+             }
+     } else if (hwmgr->chip_id == CHIP_POLARIS11) {
+             if (hwmgr->is_kicker) {
+                     min = 900;
+                     max = 2500;

the max is 2100, I think.

Fixed locally. Thanks!

Alex

Quoted 15 lines

Apart from that, it's

Regards,
Jerry

Quoted 7 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +4 -0
+             } else {
+                     min = 1100;
+                     max = 2100;
+             }
      } else {
              min = 1100;
              max = 2100;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Junwei Zhang
#7 lore raw
In reply to a message not in the archive
Quoted 4 lines · Alex Deucher

Update switch limit on newer polaris variants. This may fix flickering with high refresh rates with mclk switching enabled.

Quoted 10 lines
---
  drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
index 5dcd21d29dbf..1f12fc7ea7c9 100644
@@ -2859,7 +2859,10 @@ static int smu7_vblank_too_short(struct pp_hwmgr *hwmgr,
  	case CHIP_POLARIS10:

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c static int smu7_vblank_too_short(struct pp_hwmgr *hwmgr, · line 2868

Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +4 -1
  	case CHIP_POLARIS11:
  	case CHIP_POLARIS12:
-		switch_limit_us = data->is_memory_gddr5 ? 190 : 150;
+		if (hwmgr->is_kicker)
+			switch_limit_us = data->is_memory_gddr5 ? 450 : 150;
+		else
+			switch_limit_us = data->is_memory_gddr5 ? 190 : 150;
  		break;
  	case CHIP_VEGAM:
  		switch_limit_us = 30;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx