From: Ben Widawsky Date: Sat, 10 Aug 2013 05:12:12 +0000 (-0700) Subject: drm/i915: WARN_ON failed map_and_fenceable X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7ace7ef2f5d20632240196fa3e5d5c74cf2c1508;p=openwrt%2Fstaging%2Fblogic.git drm/i915: WARN_ON failed map_and_fenceable 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 [danvet: s/&/&&/ to fix typo on the check.] Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 959dffba0f0e..e414adaaf11d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -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;