aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2014-08-18 11:57:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2014-08-19 11:29:21 -0400
commitc940b4476f4fb649f6493b6a0ae837474ded8915 (patch)
tree290e50ba40172ff1e6c100780a8dba30c32bc00b /drivers/gpu/drm
parent1538a9e0e04f6a5b323cd3d65e9320512978fcec (diff)
drm/radeon: fix pm handling in radeon_gpu_reset
pm_suspend is handled in the radeon_suspend callbacks. pm_resume has special handling depending on whether dpm or legacy pm is enabled. Change radeon_gpu_reset to mirror the behavior in the suspend and resume pathes. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index c8ea050c8fa4..8e6187055061 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1680,7 +1680,6 @@ int radeon_gpu_reset(struct radeon_device *rdev)
1680 radeon_save_bios_scratch_regs(rdev); 1680 radeon_save_bios_scratch_regs(rdev);
1681 /* block TTM */ 1681 /* block TTM */
1682 resched = ttm_bo_lock_delayed_workqueue(&rdev->mman.bdev); 1682 resched = ttm_bo_lock_delayed_workqueue(&rdev->mman.bdev);
1683 radeon_pm_suspend(rdev);
1684 radeon_suspend(rdev); 1683 radeon_suspend(rdev);
1685 1684
1686 for (i = 0; i < RADEON_NUM_RINGS; ++i) { 1685 for (i = 0; i < RADEON_NUM_RINGS; ++i) {
@@ -1726,9 +1725,24 @@ retry:
1726 } 1725 }
1727 } 1726 }
1728 1727
1729 radeon_pm_resume(rdev); 1728 if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled) {
1729 /* do dpm late init */
1730 r = radeon_pm_late_init(rdev);
1731 if (r) {
1732 rdev->pm.dpm_enabled = false;
1733 DRM_ERROR("radeon_pm_late_init failed, disabling dpm\n");
1734 }
1735 } else {
1736 /* resume old pm late */
1737 radeon_pm_resume(rdev);
1738 }
1739
1730 drm_helper_resume_force_mode(rdev->ddev); 1740 drm_helper_resume_force_mode(rdev->ddev);
1731 1741
1742 /* set the power state here in case we are a PX system or headless */
1743 if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled)
1744 radeon_pm_compute_clocks(rdev);
1745
1732 ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched); 1746 ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched);
1733 if (r) { 1747 if (r) {
1734 /* bad news, how to tell it to userspace ? */ 1748 /* bad news, how to tell it to userspace ? */