Skip to content

Commit

Permalink
drm/i915: Retire the VMA's fence tracker before unbinding
Browse files Browse the repository at this point in the history
Since we may track unfenced access (GPU access to the vma that
explicitly requires no fence), vma->last_fence may be set without any
attached fence (vma->fence) and so will not be flushed when we call
i915_vma_put_fence(). Since we stopped doing a full retire of the
activity trackers for unbind, we need to explicitly retire each tracker.

Fixes: b0decaf ("drm/i915: Track active vma requests")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Tvrtko Ursulin <[email protected]>
(cherry picked from commit 760a898)
Signed-off-by: Daniel Vetter <[email protected]>
  • Loading branch information
ickle authored and danvet committed Jun 26, 2017
1 parent c0bc126 commit d8462d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/i915/i915_vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,11 @@ int i915_vma_unbind(struct i915_vma *vma)
break;
}

if (!ret) {
ret = i915_gem_active_retire(&vma->last_fence,
&vma->vm->i915->drm.struct_mutex);
}

__i915_vma_unpin(vma);
if (ret)
return ret;
Expand Down

0 comments on commit d8462d0

Please sign in to comment.