summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.h
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2016-12-13 20:32:19 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-12-16 21:16:36 +0000
commit17cfde60a1c4a475319990128b019666870e2afb (patch)
tree163b00aecdec7344aadd5d597e9d288b51bf2e67 /drivers/gpu/drm/i915/i915_gem.h
parentd038fc7e4fff14d6b026130007faef35cbf5e956 (diff)
downloadtalos-obmc-linux-17cfde60a1c4a475319990128b019666870e2afb.tar.gz
talos-obmc-linux-17cfde60a1c4a475319990128b019666870e2afb.zip
drm/i915: introduce GEM_WARN_ON
In a similar spirit to GEM_BUG_ON we now also have GEM_WARN_ON, with the simple goal of expressing warnings which are truly insane, and so are only really useful for CI where we have some abusive tests. v2: - use BUILD_BUG_ON_INVALID for !DEBUG_GEM - clarify commit message Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20161213203222.32564-1-matthew.auld@intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.h')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.h b/drivers/gpu/drm/i915/i915_gem.h
index 8801a14a78a2..a585d47c420a 100644
--- a/drivers/gpu/drm/i915/i915_gem.h
+++ b/drivers/gpu/drm/i915/i915_gem.h
@@ -27,8 +27,10 @@
#ifdef CONFIG_DRM_I915_DEBUG_GEM
#define GEM_BUG_ON(expr) BUG_ON(expr)
+#define GEM_WARN_ON(expr) WARN_ON(expr)
#else
#define GEM_BUG_ON(expr) BUILD_BUG_ON_INVALID(expr)
+#define GEM_WARN_ON(expr) (BUILD_BUG_ON_INVALID(expr), 0)
#endif
#define I915_NUM_ENGINES 5
OpenPOWER on IntegriCloud