drm/radeon: fix race between GPU reset and TTM delayed delete thread.
My evergreen has been in a remote PC for week and reset has never once saved me from certain doom, I finally relocated to the box with a serial cable and noticed an oops when the GPU resets, and the TTM delayed delete thread tries to remove something from the GTT. This stops the delayed delete thread from executing across the GPU reset handler, and woot I can GPU reset now. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
0f234f5fdc
commit
8fd1b84cc9
@ -936,8 +936,11 @@ int radeon_resume_kms(struct drm_device *dev)
|
||||
int radeon_gpu_reset(struct radeon_device *rdev)
|
||||
{
|
||||
int r;
|
||||
int resched;
|
||||
|
||||
radeon_save_bios_scratch_regs(rdev);
|
||||
/* block TTM */
|
||||
resched = ttm_bo_lock_delayed_workqueue(&rdev->mman.bdev);
|
||||
radeon_suspend(rdev);
|
||||
|
||||
r = radeon_asic_reset(rdev);
|
||||
@ -946,6 +949,7 @@ int radeon_gpu_reset(struct radeon_device *rdev)
|
||||
radeon_resume(rdev);
|
||||
radeon_restore_bios_scratch_regs(rdev);
|
||||
drm_helper_resume_force_mode(rdev->ddev);
|
||||
ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched);
|
||||
return 0;
|
||||
}
|
||||
/* bad news, how to tell it to userspace ? */
|
||||
|
Loading…
Reference in New Issue
Block a user