Commit d3e48352 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Change i915_vma_unbind() to report -EAGAIN on activity

If someone else acquires the i915_vma before we complete our wait and
unbind it, we currently error out with -EBUSY. Use -EAGAIN instead so
that if necessary the caller is prepared to try again.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/683


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/20191208161252.3015727-2-chris@chris-wilson.co.uk
parent 16c46fd5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1181,7 +1181,7 @@ int __i915_vma_unbind(struct i915_vma *vma)
	GEM_BUG_ON(i915_vma_is_active(vma));
	GEM_BUG_ON(i915_vma_is_active(vma));
	if (i915_vma_is_pinned(vma)) {
	if (i915_vma_is_pinned(vma)) {
		vma_print_allocator(vma, "is pinned");
		vma_print_allocator(vma, "is pinned");
		return -EBUSY;
		return -EAGAIN;
	}
	}


	GEM_BUG_ON(i915_vma_is_active(vma));
	GEM_BUG_ON(i915_vma_is_active(vma));