aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-06 09:04:51 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-13 08:23:31 -0400
commit896ab1a5d54269b463a24194c2e4a369103b46d8 (patch)
treeb741b45a98a29f50deea1630d4039ed3fa92edea /drivers/gpu/drm/i915/intel_ringbuffer.c
parent6c5566a82c6fb1da9e13a294f23d4cd85a08cb30 (diff)
drm/i915: Fix up checks for aliasing ppgtt
A subsequent patch will no longer initialize the aliasing ppgtt if we have full ppgtt enabled, since we simply don't need that any more. Unfortunately a few places check for the aliasing ppgtt instead of checking for ppgtt in general. Fix them up. One special case are the gtt offset and size macros, which have some code to remap the aliasing ppgtt to the global gtt. The aliasing ppgtt is _not_ a logical address space, so passing that in as the vm is plain and simple a bug. So just WARN about it and carry on - we have a gracefully fall-through anyway if we can't find the vma. Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 4236014c1cda..13543f8528c2 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -2006,9 +2006,7 @@ gen8_ring_dispatch_execbuffer(struct intel_engine_cs *ring,
2006 u64 offset, u32 len, 2006 u64 offset, u32 len,
2007 unsigned flags) 2007 unsigned flags)
2008{ 2008{
2009 struct drm_i915_private *dev_priv = ring->dev->dev_private; 2009 bool ppgtt = USES_PPGTT(ring->dev) && !(flags & I915_DISPATCH_SECURE);
2010 bool ppgtt = dev_priv->mm.aliasing_ppgtt != NULL &&
2011 !(flags & I915_DISPATCH_SECURE);
2012 int ret; 2010 int ret;
2013 2011
2014 ret = intel_ring_begin(ring, 4); 2012 ret = intel_ring_begin(ring, 4);