drm/radeon: add pm sysfs files late
They were added relatively early in the driver init process which meant that in some cases the driver was not finished initializing before external tools tried to use them which could result in a crash depending on the timing. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
This commit is contained in:
@@ -1633,18 +1633,8 @@ int radeon_modeset_init(struct radeon_device *rdev)
|
||||
radeon_fbdev_init(rdev);
|
||||
drm_kms_helper_poll_init(rdev->ddev);
|
||||
|
||||
if (rdev->pm.dpm_enabled) {
|
||||
/* do dpm late init */
|
||||
ret = radeon_pm_late_init(rdev);
|
||||
if (ret) {
|
||||
rdev->pm.dpm_enabled = false;
|
||||
DRM_ERROR("radeon_pm_late_init failed, disabling dpm\n");
|
||||
}
|
||||
/* set the dpm state for PX since there won't be
|
||||
* a modeset to call this.
|
||||
*/
|
||||
radeon_pm_compute_clocks(rdev);
|
||||
}
|
||||
/* do pm late init */
|
||||
ret = radeon_pm_late_init(rdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user