]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/radeon: properly handle pm on gpu reset
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 31 Jul 2013 13:16:42 +0000 (09:16 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Aug 2013 21:37:07 +0000 (17:37 -0400)
When we reset the GPU, we need to properly tear
down power management before reseting the GPU and then
set it back up again after reset.  Add the missing
radeon_pm_[suspend|resume] calls to the gpu reset
function.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_device.c

index 82335e38ec4f268e05f9d4bc1cbd875eae8523a5..84dd2dcbcf69b752a64283e37bb55e74b4747a65 100644 (file)
@@ -1519,6 +1519,7 @@ int radeon_gpu_reset(struct radeon_device *rdev)
        radeon_save_bios_scratch_regs(rdev);
        /* block TTM */
        resched = ttm_bo_lock_delayed_workqueue(&rdev->mman.bdev);
+       radeon_pm_suspend(rdev);
        radeon_suspend(rdev);
 
        for (i = 0; i < RADEON_NUM_RINGS; ++i) {
@@ -1564,6 +1565,7 @@ retry:
                }
        }
 
+       radeon_pm_resume(rdev);
        drm_helper_resume_force_mode(rdev->ddev);
 
        ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched);