Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 898b1dea authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/powerplay: enable sysfs and debugfs interfaces late



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: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarJammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 17c00a2f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -131,6 +131,10 @@ static int amdgpu_pp_late_init(void *handle)
		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;
}

@@ -145,7 +149,6 @@ static int amdgpu_pp_sw_init(void *handle)

#ifdef CONFIG_DRM_AMD_POWERPLAY
	if (adev->pp_enabled) {
		amdgpu_pm_sysfs_init(adev);
		if (amdgpu_dpm == 0)
			adev->pm.dpm_enabled = false;
		else