diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2016-07-28 09:44:49 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-08 11:32:40 -0400 |
commit | 2875125c3184c4b05f2c2c67540339e5b90813ad (patch) | |
tree | e9b0b7ac06df538383c3601849741f25b35842f8 /drivers/gpu/drm/amd/amdgpu | |
parent | 7acc83d4df77d2ed0153db2583f00a34e31fce92 (diff) |
drm/amd/amdgpu: don't track state in UVD clockgating
There's no need to track CG state anymore.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@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/uvd_v6_0.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index 4dbd5ab29bba..7f2b5de29f67 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | |||
@@ -959,21 +959,15 @@ static int uvd_v6_0_set_clockgating_state(void *handle, | |||
959 | enum amd_clockgating_state state) | 959 | enum amd_clockgating_state state) |
960 | { | 960 | { |
961 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 961 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
962 | bool enable = (state == AMD_CG_STATE_GATE) ? true : false; | ||
963 | static int curstate = -1; | ||
964 | |||
965 | if (adev->asic_type == CHIP_FIJI || | ||
966 | adev->asic_type == CHIP_POLARIS10) | ||
967 | uvd_v6_set_bypass_mode(adev, enable); | ||
968 | 962 | ||
969 | if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG)) | 963 | if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG)) |
970 | return 0; | 964 | return 0; |
971 | 965 | ||
972 | if (curstate == state) | 966 | if (adev->asic_type == CHIP_FIJI || |
973 | return 0; | 967 | adev->asic_type == CHIP_POLARIS10) |
968 | uvd_v6_set_bypass_mode(adev, state == AMD_CG_STATE_GATE ? true : false); | ||
974 | 969 | ||
975 | curstate = state; | 970 | if (state == AMD_CG_STATE_GATE) { |
976 | if (enable) { | ||
977 | /* disable HW gating and enable Sw gating */ | 971 | /* disable HW gating and enable Sw gating */ |
978 | uvd_v6_0_set_sw_clock_gating(adev); | 972 | uvd_v6_0_set_sw_clock_gating(adev); |
979 | } else { | 973 | } else { |