diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-09-25 13:53:30 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-10-10 00:00:38 +0200 |
commit | d09ae92de858d0650441a47f4578e0509186e5d8 (patch) | |
tree | ee06f103ebefa96024376805d4a5fa25222eafaa /drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | |
parent | drm/amd/pp: Expose the smu support for SDMA PG cntl (diff) | |
download | linux-d09ae92de858d0650441a47f4578e0509186e5d8.tar.xz linux-d09ae92de858d0650441a47f4578e0509186e5d8.zip |
drm/amdgpu: Move out power up/down sdma out of smu
smu only expose interface to other ip blocks.
in order to reduce dependence between smu and other ip blocks
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 12e577c14d1d..c20d413f277c 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c @@ -1364,6 +1364,9 @@ static int sdma_v4_0_hw_init(void *handle) int r; struct amdgpu_device *adev = (struct amdgpu_device *)handle; + if (adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs->set_powergating_by_smu) + amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_SDMA, false); + sdma_v4_0_init_golden_registers(adev); r = sdma_v4_0_start(adev); @@ -1381,6 +1384,9 @@ static int sdma_v4_0_hw_fini(void *handle) sdma_v4_0_ctx_switch_enable(adev, false); sdma_v4_0_enable(adev, false); + if (adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs->set_powergating_by_smu) + amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_SDMA, true); + return 0; } |