aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2019-06-24 07:26:00 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-06-24 10:29:59 -0400
commit73c86d628d6aa3d7162094ef1f0503bda17b506e (patch)
tree83582297749cfa38cabfef12a7833344a75f261c /drivers/gpu/drm/amd/amdgpu
parentf3f48d7331cf5ad9a6b3a6beff38f3dad1871b49 (diff)
drm/amdgpu: fix modprobe failure for uvd_4/5/6
For uvd_4/5/6, amdgpu driver will only power on them when there are jobs assigned to decode/enc rings.uvd_4/5/6 dpm was broken since amdgpu_dpm_set_powergating_by_smu only covers gfx block. The change would add more IP block support in amdgpu_dpm_set_powergating_by_smu For GFX/UVD/VCN/VCE, if the new SMU driver is supported, invoke new power gate helper function smu_dpm_set_power_gate, otherwise, fallback to legacy powerplay helper function pp_set_powergating_by_smu. For other IP blocks always invoke legacy powerplay helper function. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tianci Yin <tianci.yin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
index 6c2ec8123178..f082b2547b83 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
@@ -946,12 +946,21 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t block
946 946
947 switch (block_type) { 947 switch (block_type) {
948 case AMD_IP_BLOCK_TYPE_GFX: 948 case AMD_IP_BLOCK_TYPE_GFX:
949 case AMD_IP_BLOCK_TYPE_UVD:
950 case AMD_IP_BLOCK_TYPE_VCN:
951 case AMD_IP_BLOCK_TYPE_VCE:
949 if (swsmu) 952 if (swsmu)
950 ret = smu_gfx_off_control(&adev->smu, gate); 953 ret = smu_dpm_set_power_gate(&adev->smu, block_type, gate);
951 else 954 else
952 ret = ((adev)->powerplay.pp_funcs->set_powergating_by_smu( 955 ret = ((adev)->powerplay.pp_funcs->set_powergating_by_smu(
953 (adev)->powerplay.pp_handle, block_type, gate)); 956 (adev)->powerplay.pp_handle, block_type, gate));
954 break; 957 break;
958 case AMD_IP_BLOCK_TYPE_GMC:
959 case AMD_IP_BLOCK_TYPE_ACP:
960 case AMD_IP_BLOCK_TYPE_SDMA:
961 ret = ((adev)->powerplay.pp_funcs->set_powergating_by_smu(
962 (adev)->powerplay.pp_handle, block_type, gate));
963 break;
955 default: 964 default:
956 break; 965 break;
957 } 966 }