[Intel-gfx] [PATCH] drm/i915: restore ggtt double-bind avoidance
Daniel Vetter
daniel.vetter at ffwll.ch
Wed May 6 08:18:01 PDT 2015
This was accidentally lost in
commit 75d04a3773ecee617847de963ae4195d6aa74c28
Author: Mika Kuoppala <mika.kuoppala at linux.intel.com>
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 at chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry at intel.com>
Cc: Mika Kuoppala <mika.kuoppala at intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
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 8fee6789fae2..11a3b511ae64 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1928,6 +1928,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;
}
--
2.1.0
More information about the Intel-gfx
mailing list