diff options
author | Christian König <christian.koenig@amd.com> | 2015-05-05 10:52:12 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-05-07 18:00:15 +0300 |
commit | 247c405098ab731ad9b58971e2cfbab116b54b45 (patch) | |
tree | 730fc35b4be10a2757aebb47ac1e6fe8f435d52b /drivers | |
parent | db12973cd581d4e79f4aadd0960948f268d15af7 (diff) | |
download | linux-247c405098ab731ad9b58971e2cfbab116b54b45.tar.xz |
drm/radeon: fix userptr lockup
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_mn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_mn.c b/drivers/gpu/drm/radeon/radeon_mn.c index 535bf404b725..eef006c48584 100644 --- a/drivers/gpu/drm/radeon/radeon_mn.c +++ b/drivers/gpu/drm/radeon/radeon_mn.c @@ -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); |