To avoid users accessing them before the module has finished
initializing them and make sure they are only created if
dpm has properly initialized.
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
ret = adev->powerplay.ip_funcs->late_init(
adev->powerplay.pp_handle);
+#ifdef CONFIG_DRM_AMD_POWERPLAY
+ if (adev->pp_enabled)
+ amdgpu_pm_sysfs_init(adev);
+#endif
return ret;
}
#ifdef CONFIG_DRM_AMD_POWERPLAY
if (adev->pp_enabled) {
- amdgpu_pm_sysfs_init(adev);
if (amdgpu_dpm == 0)
adev->pm.dpm_enabled = false;
else