diff options
author | Christian König <christian.koenig@amd.com> | 2015-05-05 09:52:12 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-05-07 11:00:15 -0400 |
commit | 247c405098ab731ad9b58971e2cfbab116b54b45 (patch) | |
tree | 730fc35b4be10a2757aebb47ac1e6fe8f435d52b /drivers/gpu | |
parent | db12973cd581d4e79f4aadd0960948f268d15af7 (diff) | |
download | op-kernel-dev-247c405098ab731ad9b58971e2cfbab116b54b45.zip op-kernel-dev-247c405098ab731ad9b58971e2cfbab116b54b45.tar.gz |
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/gpu')
-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 535bf40..eef006c 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); |