Skip to content

Commit 128326a

Browse files
committed
drm/i915: Repeat the GEM_BUG_ON message in the ftrace log
As the ftrace log is overflowing the pstore capture, we lose the last 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 <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: Joonas Lahtinen <[email protected]> Reviewed-by: Mika Kuoppala <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d66047e commit 128326a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/i915/i915_gem.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929

3030
#ifdef CONFIG_DRM_I915_DEBUG_GEM
3131
#define GEM_BUG_ON(condition) do { if (unlikely((condition))) { \
32-
printk(KERN_ERR "GEM_BUG_ON(%s)\n", __stringify(condition)); \
32+
pr_err("%s:%d GEM_BUG_ON(%s)\n", \
33+
__func__, __LINE__, __stringify(condition)); \
34+
GEM_TRACE("%s:%d GEM_BUG_ON(%s)\n", \
35+
__func__, __LINE__, __stringify(condition)); \
3336
BUG(); \
3437
} \
3538
} while(0)

0 commit comments

Comments
 (0)