diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-05-16 08:06:53 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-24 01:15:44 -0400 |
commit | 34319b329f73eabd7e3baefecf9f71eb8b86db6f (patch) | |
tree | 0ec446d6cec48df298c452d6b1ed6dbf98258ded | |
parent | e6ee925b795311679dd6e0ebeae6f1dbe983c059 (diff) |
drm/amdgpu: skip CG for VCN when late_init/fini
VCN clockgating is handled manually like VCE and UVD.
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>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index adeb48ec4897..290e279abf0d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -1718,6 +1718,7 @@ static int amdgpu_device_ip_late_set_cg_state(struct amdgpu_device *adev) | |||
1718 | /* skip CG for VCE/UVD, it's handled specially */ | 1718 | /* skip CG for VCE/UVD, it's handled specially */ |
1719 | if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD && | 1719 | if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD && |
1720 | adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE && | 1720 | adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE && |
1721 | adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCN && | ||
1721 | adev->ip_blocks[i].version->funcs->set_clockgating_state) { | 1722 | adev->ip_blocks[i].version->funcs->set_clockgating_state) { |
1722 | /* enable clockgating to save power */ | 1723 | /* enable clockgating to save power */ |
1723 | r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev, | 1724 | r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev, |
@@ -1817,6 +1818,7 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev) | |||
1817 | 1818 | ||
1818 | if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD && | 1819 | if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD && |
1819 | adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE && | 1820 | adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE && |
1821 | adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCN && | ||
1820 | adev->ip_blocks[i].version->funcs->set_clockgating_state) { | 1822 | adev->ip_blocks[i].version->funcs->set_clockgating_state) { |
1821 | /* ungate blocks before hw fini so that we can shutdown the blocks safely */ | 1823 | /* ungate blocks before hw fini so that we can shutdown the blocks safely */ |
1822 | r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev, | 1824 | r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev, |