* [PATCH] drm/amd/powerplay: refine vce dpm update code on Cz.
@ 2017-01-10 13:28 Rex Zhu
[not found] ` <1484054886-31741-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Rex Zhu @ 2017-01-10 13:28 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu
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
Change-Id: Ied5b1630a0322678601cf5744bd1ba6b3b42ca23
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
index 0668b0b..a4cde3d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
@@ -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;
}
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <1484054886-31741-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>]
* RE: [PATCH] drm/amd/powerplay: refine vce dpm update code on Cz. [not found] ` <1484054886-31741-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org> @ 2017-01-10 21:42 ` Deucher, Alexander 0 siblings, 0 replies; 2+ messages in thread From: Deucher, Alexander @ 2017-01-10 21:42 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; +Cc: Zhu, Rex > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf > Of Rex Zhu > Sent: Tuesday, January 10, 2017 8:28 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH] 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 > > Change-Id: Ied5b1630a0322678601cf5744bd1ba6b3b42ca23 > Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> > --- > drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 24 > ++++++++++++++++-------- > 1 file changed, 16 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c > b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c > index 0668b0b..a4cde3d 100644 > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c > @@ -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; > } > -- > 1.9.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-10 21:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 13:28 [PATCH] drm/amd/powerplay: refine vce dpm update code on Cz Rex Zhu
[not found] ` <1484054886-31741-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2017-01-10 21:42 ` Deucher, Alexander
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox