[Intel-gfx] [PATCH 1/5] drm/i915: WARN_ON failed map_and_fenceable

Ben Widawsky benjamin.widawsky at intel.com
Sat Aug 10 07:12:12 CEST 2013


I just noticed in our code we don't really check the assertion, and
given some of the code I am changing in this area, I feel a WARN is very
nice to have.

Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 498ef8a..b91a7f0 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3186,6 +3186,8 @@ search_free:
 	if (i915_is_ggtt(vm))
 		obj->map_and_fenceable = mappable && fenceable;
 
+	WARN_ON(map_and_fenceable & !obj->map_and_fenceable);
+
 	trace_i915_vma_bind(vma, map_and_fenceable);
 	i915_gem_verify_gtt(dev);
 	return 0;
-- 
1.8.3.4




More information about the Intel-gfx mailing list