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

Message ID 20191208144658.3015255-1-chris@chris-wilson.co.uk
State New
Headers show
  • drm/i915: Change i915_vma_unbind() to report -EAGAIN on activity
Related show

Commit Message

Chris Wilson Dec. 8, 2019, 2:46 p.m. UTC
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.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
 drivers/gpu/drm/i915/i915_vma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 9ca6664c190c..6794c742fbbf 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -1181,7 +1181,7 @@  int __i915_vma_unbind(struct i915_vma *vma)
 	if (i915_vma_is_pinned(vma)) {
 		vma_print_allocator(vma, "is pinned");
-		return -EBUSY;
+		return -EAGAIN;