Skip to contentSkip to conversation

drm/amd/powerplay: fix vce cg logic error.

PATCH In review Rex Zhu 2 participants 2 messages Jan 10, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: fix vce cg logic error.

can fix Bug 191281: vce ib test failed.

when vce idle, set vce clock gate, so the clock in vce domain will be disabled.
when need to encode, disable vce clock gate, enable the clocks to vce engine.

Change-Id Ic60eced7be0c1e09faca596d39ebdfde244657a2
---
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c +2 -2
index 3bdce9e..3eccac7 100644
@@ -200,7 +200,7 @@ int cz_dpm_powergate_vce(struct pp_hwmgr *hwmgr, bool bgate)
 				cgs_set_clockgating_state(
 							hwmgr->device,
 							AMD_IP_BLOCK_TYPE_VCE,
-							AMD_CG_STATE_UNGATE);
+							AMD_CG_STATE_GATE);
 				cgs_set_powergating_state(
 							hwmgr->device,
 							AMD_IP_BLOCK_TYPE_VCE,
@@ -218,7 +218,7 @@ int cz_dpm_powergate_vce(struct pp_hwmgr *hwmgr, bool bgate)
 				cgs_set_clockgating_state(
 							hwmgr->device,
 							AMD_IP_BLOCK_TYPE_VCE,
-							AMD_PG_STATE_GATE);
+							AMD_PG_STATE_UNGATE);
 				cz_dpm_update_vce_dpm(hwmgr);
 				cz_enable_disable_vce_dpm(hwmgr, true);
 				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): 1484048582-16203-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 10 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, January 10, 2017 6:43 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/powerplay: fix vce cg logic error.

can fix Bug 191281: vce ib test failed.

Quoted 7 lines

when vce idle, set vce clock gate, so the clock in vce domain will be disabled.
when need to encode, disable vce clock gate, enable the clocks to vce engine.

Change-Id Ic60eced7be0c1e09faca596d39ebdfde244657a2

The logic with static clockgating is always somewhat counterintuitive (at least in my mind), but the corrected logic makes sense.

Quoted 39 lines
---
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c +1 -1
index 3bdce9e..3eccac7 100644
@@ -200,7 +200,7 @@ int cz_dpm_powergate_vce(struct pp_hwmgr
 *hwmgr, bool bgate)
 				cgs_set_clockgating_state(
 							hwmgr->device,
 
 	AMD_IP_BLOCK_TYPE_VCE,
-
 	AMD_CG_STATE_UNGATE);
+
	AMD_CG_STATE_GATE);
drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c +0 -0
 				cgs_set_powergating_state(
 							hwmgr->device,

AMD_IP_BLOCK_TYPE_VCE,

drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c +1 -1
@@ -218,7 +218,7 @@ int cz_dpm_powergate_vce(struct pp_hwmgr
 *hwmgr, bool bgate)
 				cgs_set_clockgating_state(
 							hwmgr->device,
 
 	AMD_IP_BLOCK_TYPE_VCE,
-
 	AMD_PG_STATE_GATE);
+
	AMD_PG_STATE_UNGATE);
drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c +0 -1
 				cz_dpm_update_vce_dpm(hwmgr);
 				cz_enable_disable_vce_dpm(hwmgr, true);
 				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