* [PATCH] drm/i915: Print the condition causing GEM_BUG_ON
@ 2017-10-16 15:26 Mika Kuoppala
2017-10-16 15:42 ` Joonas Lahtinen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mika Kuoppala @ 2017-10-16 15:26 UTC (permalink / raw)
To: intel-gfx
It is easier to categorize and debug bugs if the failed condition
is in plain sight in the actual dmesg output. Make it so.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@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 ee54597465b6..37ddc3f1f194 100644
--- a/drivers/gpu/drm/i915/i915_gem.h
+++ b/drivers/gpu/drm/i915/i915_gem.h
@@ -28,7 +28,10 @@
#include <linux/bug.h>
#ifdef CONFIG_DRM_I915_DEBUG_GEM
-#define GEM_BUG_ON(expr) BUG_ON(expr)
+#define GEM_BUG_ON(condition) do { if (unlikely(condition)) { \
+ printk(KERN_ERR "GEM_BUG: %s\n", __stringify(condition)); BUG(); \
+ } \
+ } while(0)
#define GEM_WARN_ON(expr) WARN_ON(expr)
#define GEM_DEBUG_DECL(var) var
--
2.11.0
_______________________________________________
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
* Re: [PATCH] drm/i915: Print the condition causing GEM_BUG_ON
2017-10-16 15:26 [PATCH] drm/i915: Print the condition causing GEM_BUG_ON Mika Kuoppala
@ 2017-10-16 15:42 ` Joonas Lahtinen
2017-10-16 16:03 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-17 4:04 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 4+ messages in thread
From: Joonas Lahtinen @ 2017-10-16 15:42 UTC (permalink / raw)
To: Mika Kuoppala, intel-gfx
On Mon, 2017-10-16 at 18:26 +0300, Mika Kuoppala wrote:
> It is easier to categorize and debug bugs if the failed condition
> is in plain sight in the actual dmesg output. Make it so.
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
<SNIP>
That's one off my TODO list. This would make life easier for CI people.
> @@ -28,7 +28,10 @@
> #include <linux/bug.h>
>
> #ifdef CONFIG_DRM_I915_DEBUG_GEM
> -#define GEM_BUG_ON(expr) BUG_ON(expr)
> +#define GEM_BUG_ON(condition) do { if (unlikely(condition)) { \
> + printk(KERN_ERR "GEM_BUG: %s\n", __stringify(condition)); BUG(); \
> + } \
> + } while(0)
To keep style consistent with WARN_ON make it;
printk(KERN_ERR "GEM_BUG_ON(%s)\n", __stringify(condition))
Then, this is;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Print the condition causing GEM_BUG_ON
2017-10-16 15:26 [PATCH] drm/i915: Print the condition causing GEM_BUG_ON Mika Kuoppala
2017-10-16 15:42 ` Joonas Lahtinen
@ 2017-10-16 16:03 ` Patchwork
2017-10-17 4:04 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-10-16 16:03 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Print the condition causing GEM_BUG_ON
URL : https://patchwork.freedesktop.org/series/32050/
State : success
== Summary ==
Series 32050v1 drm/i915: Print the condition causing GEM_BUG_ON
https://patchwork.freedesktop.org/api/1.0/series/32050/revisions/1/mbox/
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:454s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:469s
fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:393s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:566s
fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:284s
fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:520s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:524s
fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:548s
fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:566s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:431s
fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:274s
fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:597s
fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:447s
fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:456s
fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:501s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:480s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:498s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:583s
fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:489s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:591s
fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:656s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:473s
fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:659s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:528s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:569s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:469s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:590s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:438s
fi-byt-n2820 failed to connect after reboot
d6b500e96a1b961f4b74ea2b70e1f2f8ce59e1d6 drm-tip: 2017y-10m-16d-13h-20m-58s UTC integration manifest
2494e17850c0 drm/i915: Print the condition causing GEM_BUG_ON
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6057/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Print the condition causing GEM_BUG_ON
2017-10-16 15:26 [PATCH] drm/i915: Print the condition causing GEM_BUG_ON Mika Kuoppala
2017-10-16 15:42 ` Joonas Lahtinen
2017-10-16 16:03 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-10-17 4:04 ` Patchwork
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-10-17 4:04 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Print the condition causing GEM_BUG_ON
URL : https://patchwork.freedesktop.org/series/32050/
State : success
== Summary ==
Test kms_setmode:
Subgroup basic:
pass -> FAIL (shard-hsw) fdo#99912
Test kms_flip:
Subgroup dpms-vs-vblank-race-interruptible:
fail -> PASS (shard-hsw) fdo#103060
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
shard-hsw total:2553 pass:1441 dwarn:0 dfail:0 fail:9 skip:1103 time:9652s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6057/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-17 4:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-16 15:26 [PATCH] drm/i915: Print the condition causing GEM_BUG_ON Mika Kuoppala
2017-10-16 15:42 ` Joonas Lahtinen
2017-10-16 16:03 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-17 4:04 ` ✓ Fi.CI.IGT: " Patchwork
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.