diff options
author | Monk Liu <Monk.Liu@amd.com> | 2016-05-19 02:36:01 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-06-09 10:48:55 -0400 |
commit | 482587e3145ef4100b52946660ae52b457d09194 (patch) | |
tree | e41201d3f2ca3533ed4e40ee8f0340160550aa54 /drivers/gpu/drm/amd | |
parent | 212cb3b6d79bb9f525da5593133d93b107184b27 (diff) |
drm/amdgpu: impl late_fini for amdgpu_pp_ip
This implements late_init support for powerplay.
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 6bd961fb43dc..1cd53c65918b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -223,6 +223,22 @@ static int amdgpu_pp_hw_fini(void *handle) | |||
223 | return ret; | 223 | return ret; |
224 | } | 224 | } |
225 | 225 | ||
226 | static void amdgpu_pp_late_fini(void *handle) | ||
227 | { | ||
228 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | ||
229 | |||
230 | #ifdef CONFIG_DRM_AMD_POWERPLAY | ||
231 | if (adev->pp_enabled) { | ||
232 | amdgpu_pm_sysfs_fini(adev); | ||
233 | amd_powerplay_fini(adev->powerplay.pp_handle); | ||
234 | } | ||
235 | |||
236 | if (adev->powerplay.ip_funcs->late_fini) | ||
237 | adev->powerplay.ip_funcs->late_fini( | ||
238 | adev->powerplay.pp_handle); | ||
239 | #endif | ||
240 | } | ||
241 | |||
226 | static int amdgpu_pp_suspend(void *handle) | 242 | static int amdgpu_pp_suspend(void *handle) |
227 | { | 243 | { |
228 | int ret = 0; | 244 | int ret = 0; |
@@ -311,6 +327,7 @@ const struct amd_ip_funcs amdgpu_pp_ip_funcs = { | |||
311 | .sw_fini = amdgpu_pp_sw_fini, | 327 | .sw_fini = amdgpu_pp_sw_fini, |
312 | .hw_init = amdgpu_pp_hw_init, | 328 | .hw_init = amdgpu_pp_hw_init, |
313 | .hw_fini = amdgpu_pp_hw_fini, | 329 | .hw_fini = amdgpu_pp_hw_fini, |
330 | .late_fini = amdgpu_pp_late_fini, | ||
314 | .suspend = amdgpu_pp_suspend, | 331 | .suspend = amdgpu_pp_suspend, |
315 | .resume = amdgpu_pp_resume, | 332 | .resume = amdgpu_pp_resume, |
316 | .is_idle = amdgpu_pp_is_idle, | 333 | .is_idle = amdgpu_pp_is_idle, |