drm/amd/powerplay: refine vce dpm update code on Cz.
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: refine vce dpm update code on Cz.
Program HardMin based on the vce_arbiter.ecclk
if ecclk is 0, disable ECLK DPM 0. Otherwise VCE
could hang if switching SCLK from DPM 0 to 6/7
--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +16 -8
@@ -1407,14 +1407,22 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr) cz_hwmgr->vce_dpm.hard_min_clk, PPSMC_MSG_SetEclkHardMin)); }else { -/*EPR# 419220 -HW limitation to to */ - cz_hwmgr->vce_dpm.hard_min_clk = hwmgr->vce_arbiter.ecclk; -smum_send_msg_to_smc_with_parameter (hwmgr->smumgr, - PPSMC_MSG_SetEclkHardMin, -cz_get_eclk_level (hwmgr, - cz_hwmgr->vce_dpm.hard_min_clk, - PPSMC_MSG_SetEclkHardMin)); - +/*Program HardMin based on the vce_arbiter.ecclk */ +if (hwmgr->vce_arbiter.ecclk ==0 ) { +smum_send_msg_to_smc_with_parameter (hwmgr->smumgr, + PPSMC_MSG_SetEclkHardMin,0 ); +/* disable ECLK DPM 0. Otherwise VCE could hang if +* switching SCLK from DPM 0 to 6/7 */ +smum_send_msg_to_smc_with_parameter (hwmgr->smumgr, + PPSMC_MSG_SetEclkSoftMin,1 ); + }else { + cz_hwmgr->vce_dpm.hard_min_clk = hwmgr->vce_arbiter.ecclk; +smum_send_msg_to_smc_with_parameter (hwmgr->smumgr, + PPSMC_MSG_SetEclkHardMin, +cz_get_eclk_level (hwmgr, + cz_hwmgr->vce_dpm.hard_min_clk, + PPSMC_MSG_SetEclkHardMin)); + } }return 0 ; }
Signature · 6 lines
1.9.1 _______________________________________________ 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): 1484054886-31741-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Acked-by Alex DeucherQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, January 10, 2017 8:28 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/powerplay: refine vce dpm update code on Cz.
Quoted 6 lines
Program HardMin based on the vce_arbiter.ecclk
if ecclk is 0, disable ECLK DPM 0. Otherwise VCE
could hang if switching SCLK from DPM 0 to 6/7Change-Id Ied5b1630a0322678601cf5744bd1ba6b3b42ca23Signed-off-by Rex Zhu <[email protected]>
Quoted 56 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +3
-8@@ -1407,14 +1407,22 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr) cz_hwmgr- >vce_dpm.hard_min_clk, PPSMC_MSG_SetEclkHardMin)); }else { -/*EPR# 419220 -HW limitation to to */ - cz_hwmgr->vce_dpm.hard_min_clk = hwmgr- >vce_arbiter.ecclk; -smum_send_msg_to_smc_with_parameter (hwmgr- >smumgr, - PPSMC_MSG_SetEclkHardMin, -cz_get_eclk_level (hwmgr, - cz_hwmgr->vce_dpm.hard_min_clk, - PPSMC_MSG_SetEclkHardMin)); - +/*Program HardMin based on the vce_arbiter.ecclk */ + if (hwmgr->vce_arbiter.ecclk == 0) { + smum_send_msg_to_smc_with_parameter(hwmgr-Quoted 1 line
smumgr,
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +4
-0+ PPSMC_MSG_SetEclkHardMin, 0); +/* disable ECLK DPM 0. Otherwise VCE could hang if +* switching SCLK from DPM 0 to 6/7 */ + smum_send_msg_to_smc_with_parameter(hwmgr-Quoted 1 line
smumgr,
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +3
-0+ PPSMC_MSG_SetEclkSoftMin, 1); + }else { + cz_hwmgr->vce_dpm.hard_min_clk = hwmgr-Quoted 1 line
vce_arbiter.ecclk;
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +1
-0+ smum_send_msg_to_smc_with_parameter(hwmgr-Quoted 1 line
smumgr,
+
PPSMC_MSG_SetEclkHardMin,drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +2
-0+ cz_get_eclk_level(hwmgr, + cz_hwmgr-Quoted 1 line
vce_dpm.hard_min_clk,
+
PPSMC_MSG_SetEclkHardMin));drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +1
-1+ } }return 0 ; } --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx