Commit 9657aaa2 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Revoke mmap before fence

Make sure we revoke the user's mmaps of this vma to force them to take a
pagefault *before* we remove the associated aperture detiling register.

Fixes: 0d86ee35 ("drm/i915/gt: Make fence revocation unequivocal")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200403160951.8271-1-chris@chris-wilson.co.uk
parent d82a855a
......@@ -1258,6 +1258,9 @@ int __i915_vma_unbind(struct i915_vma *vma)
GEM_BUG_ON(i915_vma_is_active(vma));
if (i915_vma_is_map_and_fenceable(vma)) {
/* Force a pagefault for domain tracking on next user access */
i915_vma_revoke_mmap(vma);
/*
* Check that we have flushed all writes through the GGTT
* before the unbind, other due to non-strict nature of those
......@@ -1276,9 +1279,6 @@ int __i915_vma_unbind(struct i915_vma *vma)
/* release the fence reg _after_ flushing */
i915_vma_revoke_fence(vma);
/* Force a pagefault for domain tracking on next user access */
i915_vma_revoke_mmap(vma);
__i915_vma_iounmap(vma);
clear_bit(I915_VMA_CAN_FENCE_BIT, __i915_vma_flags(vma));
}
......
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