[Intel-gfx] [PATCH] drm/i915: Fix up the vma aliasing ppgtt binding

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 24 04:14:17 PDT 2015


On Mon, Apr 20, 2015 at 09:04:05AM -0700, Daniel Vetter wrote:
> Currently we have the problem that the decision whether ptes need to
> be (re)written is splattered all over the codebase. Move all that into
> i915_vma_bind. This needs a few changes:
> - Just reuse the PIN_* flags for i915_vma_bind and do the conversion
>   to vma->bound in there to avoid duplicating the conversion code all
>   over.
> - We need to make binding for EXECBUF (i.e. pick aliasing ppgtt if
>   around) explicit, add PIN_USER for that.
> - Two callers want to update ptes, give them a PIN_UPDATE for that.
> 
> Of course we still want to avoid double-binding, but that should be
> taken care of:
> - A ppgtt vma will only ever see PIN_USER, so no issue with
>   double-binding.
> - A ggtt vma with aliasing ppgtt needs both types of binding, and we
>   track that properly now.
> - A ggtt vma without aliasing ppgtt could be bound twice. In the
>   lower-level ->bind_vma functions hence unconditionally set
>   GLOBAL_BIND when writing the ggtt ptes.
> 
> There's still a bit room for cleanup, but that's for follow-up
> patches.
> 
> v2: Fixup fumbles.
> 
> v3: s/PIN_EXECBUF/PIN_USER/ for clearer meaning, suggested by Chris.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>

I'm getting lots of GPU hangs from this patch...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list