Re: [PATCH] drm/i915: Fix up the vma aliasing ppgtt binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>

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

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux