On Thu, Oct 15, 2015 at 09:37:31AM +0200, Daniel Vetter wrote: > This was accidentally lost in > > commit 75d04a3773ecee617847de963ae4195d6aa74c28 > Author: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > Date: Tue Apr 28 17:56:17 2015 +0300 > > drm/i915/gtt: Allocate va range only if vma is not bound > > While at it implement an improved version suggested by Chris which > avoids the double-bind irrespective of what type of bind is done > first. > > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Michel Thierry <michel.thierry@xxxxxxxxx> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > index a3910fb656e7..e90c062e1122 100644 > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > @@ -2542,6 +2542,9 @@ static int ggtt_bind_vma(struct i915_vma *vma, > cache_level, pte_flags); > } > > + if (!dev_priv->mm.aliasing_ppgtt) > + vma->bound |= GLOBAL_BIND | LOCAL_BIND; > + > return 0; > } Didn't we already add: if (!dev_priv->mm.aliasing_ppgtt || flags & GLOBAL_BIND) { vma->vm->insert_entries(vma->vm, vma->ggtt_view.pages, vma->node.start, cache_level, pte_flags); /* Note the inconsistency here is due to absence of the * aliasing ppgtt on gen4 and earlier. Though we always * request PIN_USER for execbuffer (translated to LOCAL_BIND), * without the appgtt, we cannot honour that request and so * must substitute it with a global binding. Since we do this * behind the upper layers back, we need to explicitly set * the bound flag ourselves. */ vma->bound |= GLOBAL_BIND; } to ggtt_bind_vma() ? -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx