summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_vma.c
diff options
context:
space:
mode:
authorChris Wilson2017-02-09 12:19:33 +0100
committerChris Wilson2017-02-09 13:22:15 +0100
commite1cc3db020c7ef864b7aa02d5e193a110f8f3450 (patch)
treef7d73a21ccf83d20202b6f0eda813565d29a394b /drivers/gpu/drm/i915/i915_vma.c
parentdrm/i915: Check for timeout completion when waiting for the rq to submitted (diff)
downloadkernel-qcow2-linux-e1cc3db020c7ef864b7aa02d5e193a110f8f3450.tar.gz
kernel-qcow2-linux-e1cc3db020c7ef864b7aa02d5e193a110f8f3450.tar.xz
kernel-qcow2-linux-e1cc3db020c7ef864b7aa02d5e193a110f8f3450.zip
drm/i915: Assert that we never create a vma for the aliasing_ppgtt
The aliasing_ppgtt is just a container for the HW context that mirrors the global gtt. It should never be used directly, so assert if we make the mistake of trying to allocate a VMA for it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170209111933.12420-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_vma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 155906e84812..e75494c1ef52 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -78,6 +78,9 @@ vma_create(struct drm_i915_gem_object *obj,
struct rb_node *rb, **p;
int i;
+ /* The aliasing_ppgtt should never be used directly! */
+ GEM_BUG_ON(vm == &vm->i915->mm.aliasing_ppgtt->base);
+
vma = kmem_cache_zalloc(vm->i915->vmas, GFP_KERNEL);
if (vma == NULL)
return ERR_PTR(-ENOMEM);