diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-06-05 01:06:11 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-07-05 17:38:48 -0400 |
commit | b92c628712ed3a1cf5d4a144290e8ffc170bf51e (patch) | |
tree | 049bc880c00dd06136bcb3eb1e4555c998bf14b0 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | 3eb6e4795de3171d5c59f9368f48bb770087de77 (diff) |
drm/amd/pp: Unify powergate_uvd/vce/mmhub to set_powergating_by_smu
Some HW ip blocks need call SMU to enter/leave power gate state.
So export common set_powergating_by_smu interface.
1. keep consistent with set_clockgating_by_smu
2. scales easily to powergate other ip(gfx) if necessary
Reviewed-by: Evan Quan <evan.quan@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/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index fdb399821915..a003fd881a89 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -1729,10 +1729,10 @@ static void amdgpu_dpm_change_power_state_locked(struct amdgpu_device *adev) | |||
1729 | 1729 | ||
1730 | void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable) | 1730 | void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable) |
1731 | { | 1731 | { |
1732 | if (adev->powerplay.pp_funcs->powergate_uvd) { | 1732 | if (adev->powerplay.pp_funcs->set_powergating_by_smu) { |
1733 | /* enable/disable UVD */ | 1733 | /* enable/disable UVD */ |
1734 | mutex_lock(&adev->pm.mutex); | 1734 | mutex_lock(&adev->pm.mutex); |
1735 | amdgpu_dpm_powergate_uvd(adev, !enable); | 1735 | amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_UVD, !enable); |
1736 | mutex_unlock(&adev->pm.mutex); | 1736 | mutex_unlock(&adev->pm.mutex); |
1737 | } else { | 1737 | } else { |
1738 | if (enable) { | 1738 | if (enable) { |
@@ -1751,10 +1751,10 @@ void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable) | |||
1751 | 1751 | ||
1752 | void amdgpu_dpm_enable_vce(struct amdgpu_device *adev, bool enable) | 1752 | void amdgpu_dpm_enable_vce(struct amdgpu_device *adev, bool enable) |
1753 | { | 1753 | { |
1754 | if (adev->powerplay.pp_funcs->powergate_vce) { | 1754 | if (adev->powerplay.pp_funcs->set_powergating_by_smu) { |
1755 | /* enable/disable VCE */ | 1755 | /* enable/disable VCE */ |
1756 | mutex_lock(&adev->pm.mutex); | 1756 | mutex_lock(&adev->pm.mutex); |
1757 | amdgpu_dpm_powergate_vce(adev, !enable); | 1757 | amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_VCE, !enable); |
1758 | mutex_unlock(&adev->pm.mutex); | 1758 | mutex_unlock(&adev->pm.mutex); |
1759 | } else { | 1759 | } else { |
1760 | if (enable) { | 1760 | if (enable) { |