summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_mn.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-05-05 10:52:12 +0300
committerAlex Deucher <alexander.deucher@amd.com>2015-05-07 18:00:15 +0300
commit247c405098ab731ad9b58971e2cfbab116b54b45 (patch)
tree730fc35b4be10a2757aebb47ac1e6fe8f435d52b /drivers/gpu/drm/radeon/radeon_mn.c
parentdb12973cd581d4e79f4aadd0960948f268d15af7 (diff)
downloadlinux-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/gpu/drm/radeon/radeon_mn.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_mn.c3
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);