drm/radeon/pm: move pm handling into the asic specific code
We need more control over the ordering of dpm init with respect to the rest of the asic. Specifically, the SMC has to be initialized before the rlc and cg/pg. The pm code currently initializes late in the driver, but we need it to happen much earlier so move pm handling into the asic specific callbacks. This makes dpm more reliable and makes clockgating work properly on CIK parts and should help on SI parts as well. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1048,6 +1048,8 @@ int rs600_resume(struct radeon_device *rdev)
|
||||
/* Initialize surface registers */
|
||||
radeon_surface_init(rdev);
|
||||
|
||||
radeon_pm_resume(rdev);
|
||||
|
||||
rdev->accel_working = true;
|
||||
r = rs600_startup(rdev);
|
||||
if (r) {
|
||||
@@ -1058,6 +1060,7 @@ int rs600_resume(struct radeon_device *rdev)
|
||||
|
||||
int rs600_suspend(struct radeon_device *rdev)
|
||||
{
|
||||
radeon_pm_suspend(rdev);
|
||||
r600_audio_fini(rdev);
|
||||
r100_cp_disable(rdev);
|
||||
radeon_wb_disable(rdev);
|
||||
@@ -1068,6 +1071,7 @@ int rs600_suspend(struct radeon_device *rdev)
|
||||
|
||||
void rs600_fini(struct radeon_device *rdev)
|
||||
{
|
||||
radeon_pm_fini(rdev);
|
||||
r600_audio_fini(rdev);
|
||||
r100_cp_fini(rdev);
|
||||
radeon_wb_fini(rdev);
|
||||
@@ -1136,6 +1140,9 @@ int rs600_init(struct radeon_device *rdev)
|
||||
return r;
|
||||
rs600_set_safe_registers(rdev);
|
||||
|
||||
/* Initialize power management */
|
||||
radeon_pm_init(rdev);
|
||||
|
||||
rdev->accel_working = true;
|
||||
r = rs600_startup(rdev);
|
||||
if (r) {
|
||||
|
Reference in New Issue
Block a user