public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/i915: introduce GEM_WARN_ON
@ 2016-12-13 20:32 Matthew Auld
  2016-12-13 20:32 ` [PATCH 2/4] drm/i915: move vma sanity checking into i915_vma_bind Matthew Auld
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Matthew Auld @ 2016-12-13 20:32 UTC (permalink / raw)
  To: intel-gfx

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>
---
 drivers/gpu/drm/i915/i915_gem.h | 2 ++
 1 file changed, 2 insertions(+)

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
-- 
2.9.3

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

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

end of thread, other threads:[~2016-12-16 21:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-13 20:32 [PATCH 1/4] drm/i915: introduce GEM_WARN_ON Matthew Auld
2016-12-13 20:32 ` [PATCH 2/4] drm/i915: move vma sanity checking into i915_vma_bind Matthew Auld
2016-12-13 21:34   ` Chris Wilson
2016-12-13 20:32 ` [PATCH 3/4] drm/i915: introduce range_overflows utility macros Matthew Auld
2016-12-13 21:31   ` Chris Wilson
2016-12-13 20:32 ` [PATCH 4/4] drm/i915: convert to using range_overflows Matthew Auld
2016-12-13 21:32   ` Chris Wilson
2016-12-13 21:15 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: introduce GEM_WARN_ON Patchwork
2016-12-16 21:28   ` Chris Wilson
2016-12-13 21:35 ` [PATCH 1/4] " Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox