diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-09-22 05:47:27 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-28 16:03:31 -0400 |
commit | d2f52ac800fec229f2931603e8b7fb9c5ade7aa7 (patch) | |
tree | ff223b1869d19521e53f18aed47aacf088ff997c /drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |
parent | c98171ccf6580407d07a3b5dc8188ce9e1f4f7ca (diff) |
drm/amdgpu: move common pm sysfs code to amdgpu_device.c
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 2d2f0960b025..1ad632388c95 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -137,10 +137,8 @@ static int amdgpu_pp_late_init(void *handle) | |||
137 | ret = adev->powerplay.ip_funcs->late_init( | 137 | ret = adev->powerplay.ip_funcs->late_init( |
138 | adev->powerplay.pp_handle); | 138 | adev->powerplay.pp_handle); |
139 | 139 | ||
140 | if (adev->pp_enabled && adev->pm.dpm_enabled) { | 140 | if (adev->pp_enabled && adev->pm.dpm_enabled) |
141 | amdgpu_pm_sysfs_init(adev); | ||
142 | amdgpu_dpm_dispatch_task(adev, AMD_PP_TASK_COMPLETE_INIT, NULL, NULL); | 141 | amdgpu_dpm_dispatch_task(adev, AMD_PP_TASK_COMPLETE_INIT, NULL, NULL); |
143 | } | ||
144 | 142 | ||
145 | return ret; | 143 | return ret; |
146 | } | 144 | } |
@@ -199,9 +197,6 @@ static int amdgpu_pp_hw_fini(void *handle) | |||
199 | int ret = 0; | 197 | int ret = 0; |
200 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 198 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
201 | 199 | ||
202 | if (adev->pp_enabled && adev->pm.dpm_enabled) | ||
203 | amdgpu_pm_sysfs_fini(adev); | ||
204 | |||
205 | if (adev->powerplay.ip_funcs->hw_fini) | 200 | if (adev->powerplay.ip_funcs->hw_fini) |
206 | ret = adev->powerplay.ip_funcs->hw_fini( | 201 | ret = adev->powerplay.ip_funcs->hw_fini( |
207 | adev->powerplay.pp_handle); | 202 | adev->powerplay.pp_handle); |