diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/cz_dpm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c index 352b5fad5a06..ba2b66be9022 100644 --- a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c | |||
| @@ -438,7 +438,7 @@ static int cz_dpm_init(struct amdgpu_device *adev) | |||
| 438 | pi->caps_td_ramping = true; | 438 | pi->caps_td_ramping = true; |
| 439 | pi->caps_tcp_ramping = true; | 439 | pi->caps_tcp_ramping = true; |
| 440 | } | 440 | } |
| 441 | if (amdgpu_sclk_deep_sleep_en) | 441 | if (amdgpu_pp_feature_mask & SCLK_DEEP_SLEEP_MASK) |
| 442 | pi->caps_sclk_ds = true; | 442 | pi->caps_sclk_ds = true; |
| 443 | else | 443 | else |
| 444 | pi->caps_sclk_ds = false; | 444 | pi->caps_sclk_ds = false; |
| @@ -2111,9 +2111,8 @@ static void cz_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate) | |||
| 2111 | 2111 | ||
| 2112 | if (gate) { | 2112 | if (gate) { |
| 2113 | if (pi->caps_uvd_pg) { | 2113 | if (pi->caps_uvd_pg) { |
| 2114 | /* disable clockgating so we can properly shut down the block */ | ||
| 2115 | ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_UVD, | 2114 | ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_UVD, |
| 2116 | AMD_CG_STATE_UNGATE); | 2115 | AMD_CG_STATE_GATE); |
| 2117 | if (ret) { | 2116 | if (ret) { |
| 2118 | DRM_ERROR("UVD DPM Power Gating failed to set clockgating state\n"); | 2117 | DRM_ERROR("UVD DPM Power Gating failed to set clockgating state\n"); |
| 2119 | return; | 2118 | return; |
| @@ -2159,9 +2158,8 @@ static void cz_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate) | |||
| 2159 | return; | 2158 | return; |
| 2160 | } | 2159 | } |
| 2161 | 2160 | ||
| 2162 | /* enable clockgating. hw will dynamically gate/ungate clocks on the fly */ | ||
| 2163 | ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_UVD, | 2161 | ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_UVD, |
| 2164 | AMD_CG_STATE_GATE); | 2162 | AMD_CG_STATE_UNGATE); |
| 2165 | if (ret) { | 2163 | if (ret) { |
| 2166 | DRM_ERROR("UVD DPM Power Gating Failed to set clockgating state\n"); | 2164 | DRM_ERROR("UVD DPM Power Gating Failed to set clockgating state\n"); |
| 2167 | return; | 2165 | return; |
