[PATCH] drm/amd/pm: Activate a more aggressive DPM policy while there's heavy load.

Li, Xin (Justin) Xin2.Li at amd.com
Tue Oct 27 06:38:24 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Fix performace drop while streaming Doom

Signed-off-by: Li, Xin (Justin) <Xin2.Li at amd.com<mailto:Xin2.Li at amd.com>>
Signed-off-by: Zhao, Jiange <Jiange.Zhao at amd.com<mailto:Jiange.Zhao at amd.com>>
---
 drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
index eab9768029c1..5287ac4e8364 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
@@ -125,6 +125,20 @@ static int pp_hw_init(void *handle)

         ret = hwmgr_hw_init(hwmgr);

+       if (adev->pdev->device == 0x6860 && adev->pdev->revision == 0x07) {
+               long param[5];
+
+               param[0] = 5;  // busy_set_point
+               param[1] = 60; // FPS
+               param[2] = 0;  // use_rlc_busy
+               param[3] = 3;  // min_active_level
+               param[4] = PP_SMC_POWER_PROFILE_CUSTOM;
+
+               mutex_lock(&hwmgr->smu_lock);
+               ret = hwmgr->hwmgr_func->set_power_profile_mode(hwmgr, param, 4);
+               mutex_unlock(&hwmgr->smu_lock);
+       }
+
         if (ret)
                 pr_err("powerplay hw init failed\n");

--
2.24.3 (Apple Git-128)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20201027/1701897c/attachment.htm>


More information about the amd-gfx mailing list