summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-05-05 09:52:12 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-05-07 17:00:15 +0200
commit247c405098ab731ad9b58971e2cfbab116b54b45 (patch)
tree730fc35b4be10a2757aebb47ac1e6fe8f435d52b /drivers
parentdrm/radeon: fix userptr BO unpin bug v3 (diff)
downloadlinux-247c405098ab731ad9b58971e2cfbab116b54b45.tar.xz
linux-247c405098ab731ad9b58971e2cfbab116b54b45.zip
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.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);