diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-12-19 20:37:22 +0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-12-25 02:54:56 +0400 |
commit | 914a89872be27db59546525ea96be817c7b2509c (patch) | |
tree | 927b30218bcbc8439281e85cd1c71cc92a513cdb /drivers/gpu/drm/radeon/radeon_pm.c | |
parent | 01ac8794a77192236a4b91c33adf4177ac5a21f0 (diff) | |
download | linux-914a89872be27db59546525ea96be817c7b2509c.tar.xz |
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.c | 12 |
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) { |