[PATCH 2/2] drm/amdgpu: power down the Vega20 VCE engine on request

Deucher, Alexander Alexander.Deucher at amd.com
Thu Apr 25 14:54:20 UTC 2019


Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Evan Quan <evan.quan at amd.com>
Sent: Thursday, April 25, 2019 3:52 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander; Quan, Evan; Liu, Leo
Subject: [PATCH 2/2] drm/amdgpu: power down the Vega20 VCE engine on request

Power down the engine also along with disabling its DPM
functionality.

Change-Id: Ia0940b40d01da84269621d8a914c923fbf1b7da4
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
index 7534eb628803..eb7002401587 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
@@ -3490,7 +3490,18 @@ static void vega20_power_gate_vce(struct pp_hwmgr *hwmgr, bool bgate)
                 return ;

         data->vce_power_gated = bgate;
-       vega20_enable_disable_vce_dpm(hwmgr, !bgate);
+       if (bgate) {
+               vega20_enable_disable_vce_dpm(hwmgr, !bgate);
+               amdgpu_device_ip_set_powergating_state(hwmgr->adev,
+                                               AMD_IP_BLOCK_TYPE_VCE,
+                                               AMD_PG_STATE_GATE);
+       } else {
+               amdgpu_device_ip_set_powergating_state(hwmgr->adev,
+                                               AMD_IP_BLOCK_TYPE_VCE,
+                                               AMD_PG_STATE_UNGATE);
+               vega20_enable_disable_vce_dpm(hwmgr, !bgate);
+       }
+
 }

 static void vega20_power_gate_uvd(struct pp_hwmgr *hwmgr, bool bgate)
--
2.21.0

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190425/4b38525b/attachment.html>


More information about the amd-gfx mailing list