]> Git Repo - linux.git/commitdiff
drm/amdgpu: power down the Vega20 VCE engine on request
authorEvan Quan <[email protected]>
Thu, 25 Apr 2019 07:38:25 +0000 (15:38 +0800)
committerAlex Deucher <[email protected]>
Mon, 29 Apr 2019 19:59:58 +0000 (14:59 -0500)
Power down the engine also along with disabling its DPM
functionality.

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c

index 34f3782ff018dead05c1d84d2ceaf86438ddcf37..1f5614f04661b9461b87d77d31b6d4e283cd4cc7 100644 (file)
@@ -3452,7 +3452,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)
This page took 0.067142 seconds and 4 git commands to generate.