drm/i915: WARN_ON failed map_and_fenceable
authorBen Widawsky <benjamin.widawsky@intel.com>
Sat, 10 Aug 2013 05:12:12 +0000 (22:12 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 22 Aug 2013 11:31:35 +0000 (13:31 +0200)
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@bwidawsk.net>
[danvet: s/&/&&/ to fix typo on the check.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c

index 959dffba0f0e0fef46ce3e840378d06a198371a1..e414adaaf11d39c30611ae349ef4d14a37303fd0 100644 (file)
@@ -3211,6 +3211,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;