summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_pm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-12-19 11:37:22 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-12-24 17:54:56 -0500
commit914a89872be27db59546525ea96be817c7b2509c (patch)
tree927b30218bcbc8439281e85cd1c71cc92a513cdb /drivers/gpu/drm/radeon/radeon_pm.c
parent01ac8794a77192236a4b91c33adf4177ac5a21f0 (diff)
downloadtalos-op-linux-914a89872be27db59546525ea96be817c7b2509c.tar.gz
talos-op-linux-914a89872be27db59546525ea96be817c7b2509c.zip
drm/radeon/dpm: add a late enable callback
Certain features need to be enabled after ring tests (e.g., powergating, etc.). Add a function pointer to split out late enable features. 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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 384758d011e4..d4e5bcfeb77d 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -1288,6 +1288,18 @@ int radeon_pm_init(struct radeon_device *rdev)
return radeon_pm_init_old(rdev);
}
+int radeon_pm_late_init(struct radeon_device *rdev)
+{
+ int ret = 0;
+
+ if (rdev->pm.pm_method == PM_METHOD_DPM) {
+ mutex_lock(&rdev->pm.mutex);
+ ret = radeon_dpm_late_enable(rdev);
+ mutex_unlock(&rdev->pm.mutex);
+ }
+ return ret;
+}
+
static void radeon_pm_fini_old(struct radeon_device *rdev)
{
if (rdev->pm.num_power_states > 1) {
OpenPOWER on IntegriCloud