Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Monk Liu and committed by
Alex Deucher
482587e3 212cb3b6

+17
+17
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
··· 223 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 242 static int amdgpu_pp_suspend(void *handle) 227 243 { 228 244 int ret = 0; ··· 327 311 .sw_fini = amdgpu_pp_sw_fini, 328 312 .hw_init = amdgpu_pp_hw_init, 329 313 .hw_fini = amdgpu_pp_hw_fini, 314 + .late_fini = amdgpu_pp_late_fini, 330 315 .suspend = amdgpu_pp_suspend, 331 316 .resume = amdgpu_pp_resume, 332 317 .is_idle = amdgpu_pp_is_idle,