diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c index 72e86b32ab4182e233459394032f3dbe261ae7e1..2bad88cc927b489785d323f7206a74e5569eb441 100644 --- a/drivers/gpu/drm/i915/i915_vma.c +++ b/drivers/gpu/drm/i915/i915_vma.c @@ -513,6 +513,13 @@ i915_vma_insert(struct i915_vma *vma, u64 size, u64 alignment, u64 flags) rounddown_pow_of_two(vma->page_sizes.sg | I915_GTT_PAGE_SIZE_2M); + /* + * Check we don't expand for the limited Global GTT + * (mappable aperture is even more precious!). This + * also checks that we exclude the aliasing-ppgtt. + */ + GEM_BUG_ON(i915_vma_is_ggtt(vma)); + alignment = max(alignment, page_alignment); if (vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K)