Skip to contentSkip to conversation

drm/amd/powerplay: optimize the mclk dpm policy settings

PATCH In review Alex Deucher 2 participants 3 messages Jul 30, 2020 – Sep 21, 2020

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

PATCH 1/1 drm/amd/powerplay: optimize the mclk dpm policy settings

From: Evan Quan <[email protected]>

Different mclk dpm policy will be applied based on the VRAM width.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +13 -3
index ffe05b7cc1f0..b81719433017 100644
@@ -1585,9 +1585,19 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
 	data->current_profile_setting.sclk_down_hyst = 100;
 	data->current_profile_setting.sclk_activity = SMU7_SCLK_TARGETACTIVITY_DFLT;
 	data->current_profile_setting.bupdate_mclk = 1;
-	data->current_profile_setting.mclk_up_hyst = 0;
-	data->current_profile_setting.mclk_down_hyst = 100;
-	data->current_profile_setting.mclk_activity = SMU7_MCLK_TARGETACTIVITY_DFLT;
+	if (adev->gmc.vram_width == 256) {
+		data->current_profile_setting.mclk_up_hyst = 10;
+		data->current_profile_setting.mclk_down_hyst = 60;
+		data->current_profile_setting.mclk_activity = 25;
+	} else if (adev->gmc.vram_width == 128) {
+		data->current_profile_setting.mclk_up_hyst = 5;
+		data->current_profile_setting.mclk_down_hyst = 16;
+		data->current_profile_setting.mclk_activity = 20;
+	} else if (adev->gmc.vram_width == 64) {
+		data->current_profile_setting.mclk_up_hyst = 3;
+		data->current_profile_setting.mclk_down_hyst = 16;
+		data->current_profile_setting.mclk_activity = 20;
+	}
 	hwmgr->workload_mask = 1 << hwmgr->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D];
 	hwmgr->power_profile_mode = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
 	hwmgr->default_power_profile_mode = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
Signature · 6 lines
2.25.4

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

Ping?

Quoted 40 lines · Alex Deucher

From: Evan Quan <[email protected]>

Different mclk dpm policy will be applied based on the VRAM width.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +13 -4
index ffe05b7cc1f0..b81719433017 100644
@@ -1585,9 +1585,19 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
        data->current_profile_setting.sclk_down_hyst = 100;
        data->current_profile_setting.sclk_activity = SMU7_SCLK_TARGETACTIVITY_DFLT;
        data->current_profile_setting.bupdate_mclk = 1;
-       data->current_profile_setting.mclk_up_hyst = 0;
-       data->current_profile_setting.mclk_down_hyst = 100;
-       data->current_profile_setting.mclk_activity = SMU7_MCLK_TARGETACTIVITY_DFLT;
+       if (adev->gmc.vram_width == 256) {
+               data->current_profile_setting.mclk_up_hyst = 10;
+               data->current_profile_setting.mclk_down_hyst = 60;
+               data->current_profile_setting.mclk_activity = 25;
+       } else if (adev->gmc.vram_width == 128) {
+               data->current_profile_setting.mclk_up_hyst = 5;
+               data->current_profile_setting.mclk_down_hyst = 16;
+               data->current_profile_setting.mclk_activity = 20;
+       } else if (adev->gmc.vram_width == 64) {
+               data->current_profile_setting.mclk_up_hyst = 3;
+               data->current_profile_setting.mclk_down_hyst = 16;
+               data->current_profile_setting.mclk_activity = 20;
+       }
        hwmgr->workload_mask = 1 << hwmgr->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D];
        hwmgr->power_profile_mode = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
        hwmgr->default_power_profile_mode = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
--
Quoted 2 lines

2.25.4

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

Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Deucher

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, July 31, 2020 2:17 AM
To: [email protected]
Cc: Quan, Evan <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amd/powerplay: optimize the mclk dpm policy settings

From: Evan Quan <[email protected]>

Different mclk dpm policy will be applied based on the VRAM width.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +13 -3
index ffe05b7cc1f0..b81719433017 100644
@@ -1585,9 +1585,19 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
 data->current_profile_setting.sclk_down_hyst = 100;
 data->current_profile_setting.sclk_activity = SMU7_SCLK_TARGETACTIVITY_DFLT;
 data->current_profile_setting.bupdate_mclk = 1;
-data->current_profile_setting.mclk_up_hyst = 0;
-data->current_profile_setting.mclk_down_hyst = 100;
-data->current_profile_setting.mclk_activity = SMU7_MCLK_TARGETACTIVITY_DFLT;
+if (adev->gmc.vram_width == 256) {
+data->current_profile_setting.mclk_up_hyst = 10;
+data->current_profile_setting.mclk_down_hyst = 60;
+data->current_profile_setting.mclk_activity = 25;
+} else if (adev->gmc.vram_width == 128) {
+data->current_profile_setting.mclk_up_hyst = 5;
+data->current_profile_setting.mclk_down_hyst = 16;
+data->current_profile_setting.mclk_activity = 20;
+} else if (adev->gmc.vram_width == 64) {
+data->current_profile_setting.mclk_up_hyst = 3;
+data->current_profile_setting.mclk_down_hyst = 16;
+data->current_profile_setting.mclk_activity = 20;
+}
 hwmgr->workload_mask = 1 << hwmgr->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D];
 hwmgr->power_profile_mode = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
 hwmgr->default_power_profile_mode = PP_SMC_POWER_PROFILE_FULLSCREEN3D;

--
2.25.4

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