summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_pm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-12-18 14:07:14 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-12-24 17:57:06 -0500
commit6c7bccea390853bdec5b76fe31fc50f3b36f75d5 (patch)
tree2b6002db2816965b8d2850728b81ff0099b036a9 /drivers/gpu/drm/radeon/radeon_pm.c
parente14cd2bbcb98541e199b7223f38d61527dfe45c9 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 7fc76d165e89..933ada0147b5 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -1034,10 +1034,6 @@ static void radeon_pm_resume_dpm(struct radeon_device *rdev)
mutex_unlock(&rdev->pm.mutex);
if (ret)
goto dpm_resume_fail;
- ret = radeon_pm_late_init(rdev);
- if (ret)
- goto dpm_resume_fail;
-
rdev->pm.dpm_enabled = true;
radeon_pm_compute_clocks(rdev);
return;
@@ -1178,11 +1174,7 @@ static int radeon_pm_init_dpm(struct radeon_device *rdev)
mutex_unlock(&rdev->pm.mutex);
if (ret)
goto dpm_failed;
- ret = radeon_pm_late_init(rdev);
- if (ret)
- goto dpm_failed;
rdev->pm.dpm_enabled = true;
- radeon_pm_compute_clocks(rdev);
ret = device_create_file(rdev->dev, &dev_attr_power_dpm_state);
if (ret)
@@ -1441,6 +1433,9 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev)
struct drm_crtc *crtc;
struct radeon_crtc *radeon_crtc;
+ if (!rdev->pm.dpm_enabled)
+ return;
+
mutex_lock(&rdev->pm.mutex);
/* update active crtc counts */