Commit 22e2e865 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/radeon: fix wait in radeon_mn_invalidate_range_start

We need to wait for all fences, not just the exclusive one.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 863653fe
...@@ -122,7 +122,6 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn, ...@@ -122,7 +122,6 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn,
it = interval_tree_iter_first(&rmn->objects, start, end); it = interval_tree_iter_first(&rmn->objects, start, end);
while (it) { while (it) {
struct radeon_bo *bo; struct radeon_bo *bo;
struct fence *fence;
int r; int r;
bo = container_of(it, struct radeon_bo, mn_it); bo = container_of(it, struct radeon_bo, mn_it);
...@@ -134,12 +133,10 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn, ...@@ -134,12 +133,10 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn,
continue; continue;
} }
fence = reservation_object_get_excl(bo->tbo.resv); r = reservation_object_wait_timeout_rcu(bo->tbo.resv, true,
if (fence) { false, MAX_SCHEDULE_TIMEOUT);
r = radeon_fence_wait((struct radeon_fence *)fence, false); if (r)
if (r) DRM_ERROR("(%d) failed to wait for user bo\n", r);
DRM_ERROR("(%d) failed to wait for user bo\n", r);
}
radeon_ttm_placement_from_domain(bo, RADEON_GEM_DOMAIN_CPU); radeon_ttm_placement_from_domain(bo, RADEON_GEM_DOMAIN_CPU);
r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false); r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment