All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Assert the vma can fit within the address space
@ 2017-01-19 12:58 Chris Wilson
  2017-01-19 12:58 ` [PATCH 2/2] drm/i915: Reject an attempt to create a GGTT vma larger than the GTT Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Chris Wilson @ 2017-01-19 12:58 UTC (permalink / raw)
  To: intel-gfx

Useful sanity check that the vma is legal to bind inside the address
space.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_vma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 635f2635b1f2..68e66ffb95e8 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -107,6 +107,8 @@ vma_create(struct drm_i915_gem_object *obj,
 		}
 	}
 
+	GEM_BUG_ON(vma->size > vm->total);
+
 	if (i915_is_ggtt(vm)) {
 		GEM_BUG_ON(overflows_type(vma->size, u32));
 		vma->fence_size = i915_gem_fence_size(vm->i915, vma->size,
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-01-20 11:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-19 12:58 [PATCH 1/2] drm/i915: Assert the vma can fit within the address space Chris Wilson
2017-01-19 12:58 ` [PATCH 2/2] drm/i915: Reject an attempt to create a GGTT vma larger than the GTT Chris Wilson
2017-01-19 13:18   ` Joonas Lahtinen
2017-01-19 13:24     ` Chris Wilson
2017-01-19 13:04 ` [PATCH 1/2] drm/i915: Assert the vma can fit within the address space Mika Kuoppala
2017-01-19 13:10 ` Joonas Lahtinen
2017-01-19 13:28 ` [PATCH] drm/i915: Assert that the vma->fence_size doesn't overflow and wraparound Chris Wilson
2017-01-19 14:40   ` Mika Kuoppala
2017-01-19 13:31 ` [PATCH] drm/i915: Assert that created vma has a whole number of pages Chris Wilson
2017-01-19 14:41   ` Mika Kuoppala
2017-01-19 14:30 ` [PATCH 1/2] drm/i915: Assert the vma can fit within the address space Chris Wilson
2017-01-20 11:35   ` Joonas Lahtinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.