Skip to content

Commit

Permalink
drm/radeon: fix userptr lockup
Browse files Browse the repository at this point in the history
We shouldn't try to reserve and wait for a BO that isn't bound. Otherwise
we can run into a deadlock if we have a fault during binding the BO.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Christian König authored and Alex Deucher committed May 7, 2015
1 parent db12973 commit 247c405
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/radeon/radeon_mn.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn,

list_for_each_entry(bo, &node->bos, mn_list) {

if (!bo->tbo.ttm || bo->tbo.ttm->state != tt_bound)
continue;

r = radeon_bo_reserve(bo, true);
if (r) {
DRM_ERROR("(%ld) failed to reserve user bo\n", r);
Expand Down

0 comments on commit 247c405

Please sign in to comment.