[Intel-gfx] [PATCH 12/22] drm/i915: Start passing around i915_vma from execbuffer

Chris Wilson chris at chris-wilson.co.uk
Mon Aug 1 07:34:06 UTC 2016


On Fri, Jul 29, 2016 at 11:23:43AM +0300, Joonas Lahtinen wrote:
> On ke, 2016-07-27 at 12:14 +0100, Chris Wilson wrote:
> 
> > +	if (i915_vma_misplaced(vma, size, alignment, flags)) {
> > +		if (flags & PIN_NONBLOCK &&
> > +		    (i915_vma_is_pinned(vma) || i915_vma_is_active(vma)))
> > +			return -ENOSPC;
> 
> Why ENOSPC when active? Would not EAGAIN be more appropriate?

The interface used by execbuf that PIN_NONBLOCK results in ENOSPC. That
allows us to do a trial-and-error pass with ENOSPC being resolved later
and all the others going back to userspace, primarily EIO, EAGAIN, EINTR,
EINVAL. On the second pass we drop the NONBLOCK and if were a genuine
failure, it will result in ENOSPC again.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list