static void amdgpu_pp_late_fini(void *handle) { #ifdef CONFIG_DRM_AMD_POWERPLAY struct amdgpu_device *adev = (struct amdgpu_device *)handle; if (adev->pp_enabled) { amdgpu_pm_sysfs_fini(adev); amd_powerplay_fini(adev->powerplay.pp_handle); } if (adev->powerplay.ip_funcs->late_fini) adev->powerplay.ip_funcs->late_fini( adev->powerplay.pp_handle); #endif }
static int amdgpu_pp_sw_fini(void *handle) { int ret = 0; struct amdgpu_device *adev = (struct amdgpu_device *)handle; if (adev->powerplay.ip_funcs->sw_fini) ret = adev->powerplay.ip_funcs->sw_fini( adev->powerplay.pp_handle); if (ret) return ret; #ifdef CONFIG_DRM_AMD_POWERPLAY if (adev->pp_enabled) { amdgpu_pm_sysfs_fini(adev); amd_powerplay_fini(adev->powerplay.pp_handle); } #endif return ret; }