All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Repeat the GEM_BUG_ON message in the ftrace log
@ 2018-02-27 21:18 Chris Wilson
  2018-02-27 21:51 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2018-02-28  9:14 ` [PATCH] " Mika Kuoppala
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2018-02-27 21:18 UTC (permalink / raw)
  To: intel-gfx

As the ftrace log is overflowing the pstore capture, we lose the gasps
from dmesg which includes the GEM_BUG_ON function:line and condition that
failed. Vital information for tracking down the bug, so append it to the
frace log as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.h b/drivers/gpu/drm/i915/i915_gem.h
index e920dab7f1b8..d9f0709973d1 100644
--- a/drivers/gpu/drm/i915/i915_gem.h
+++ b/drivers/gpu/drm/i915/i915_gem.h
@@ -29,7 +29,10 @@
 
 #ifdef CONFIG_DRM_I915_DEBUG_GEM
 #define GEM_BUG_ON(condition) do { if (unlikely((condition))) {	\
-		printk(KERN_ERR "GEM_BUG_ON(%s)\n", __stringify(condition)); \
+		pr_err("%s:%d GEM_BUG_ON(%s)\n", \
+		       __func__, __LINE__, __stringify(condition)); \
+		GEM_TRACE("%s:%d GEM_BUG_ON(%s)\n", \
+			  __func__, __LINE__, __stringify(condition)); \
 		BUG(); \
 		} \
 	} while(0)
-- 
2.16.2

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

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

end of thread, other threads:[~2018-02-28  9:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 21:18 [PATCH] drm/i915: Repeat the GEM_BUG_ON message in the ftrace log Chris Wilson
2018-02-27 21:51 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-02-28  9:14 ` [PATCH] " Mika Kuoppala
2018-02-28  9:33   ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.