drm/amdgpu: power down the Vega20 VCE engine on request

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

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Evan Quan 2019-04-25 15:38:25 +08:00 committed by Alex Deucher
parent 2c7e78355b
commit b0fc850fd9

View 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)