Skip to content

Commit

Permalink
drm/radeon: properly handle pm on gpu reset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Deucher committed Aug 7, 2013
1 parent adfb8e5 commit 95f5950
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/radeon/radeon_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -1564,6 +1565,7 @@ int radeon_gpu_reset(struct radeon_device *rdev)
}
}

radeon_pm_resume(rdev);
drm_helper_resume_force_mode(rdev->ddev);

ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched);
Expand Down

0 comments on commit 95f5950

Please sign in to comment.