drm/i915: throw __must_check at GEM_WARN_ON
Subsystems (2)
PATCH 1/1 drm/i915: throw __must_check at GEM_WARN_ON
GEM_WARN_ON is intended to be used as:
if (GEM_WARN_ON(expr))
...
However this isn't clear since we just wrap WARN_ON, therefore throw a warning if the result is ignored. For !DRM_I915_DEBUG_GEM builds this should already be the case.
--- drivers/gpu/drm/i915/i915_gem.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.h +8 -1
@@ -36,7 +36,14 @@BUG (); \ } \ }while (0 ) -#define GEM_WARN_ON (expr) WARN_ON(expr) + +static __always_inline bool __must_check __gem_warn_on(bool v) +{ +return WARN_ON (v); +} + +/* To be used as: if (GEM_WARN_ON(expr)) */ +#define GEM_WARN_ON (expr) __gem_warn_on(expr)#define GEM_DEBUG_DECL (var) var#define GEM_DEBUG_EXEC (expr) expr
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: throw __must_check at GEM_WARN_ON
== Series Details ==
== Series Details ==
Series: drm/i915: throw __must_check at GEM_WARN_ON
URL : https://patchwork.freedesktop.org/series/41136/
State : success
== Summary ==
Series 41136v1 drm/i915: throw __must_check at GEM_WARN_ON
https://patchwork.freedesktop.org/api/1.0/series/41136/revisions/1/mbox/
---- Known issues:
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:438s fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:440s fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:387s fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:538s fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:297s fi-bxt-dsi total:285 pass:255 dwarn:0 dfail:0 fail:0 skip:30 time:513s fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:512s fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:523s fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:518s fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:411s fi-cfl-s3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:561s fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:510s fi-cnl-y3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:593s fi-elk-e7500 total:285 pass:225 dwarn:1 dfail:0 fail:0 skip:59 time:426s fi-gdg-551 total:285 pass:177 dwarn:0 dfail:0 fail:0 skip:108 time:312s fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:540s fi-glk-j4005 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:484s fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:404s fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:420s fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:473s fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:431s fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:473s fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:461s fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:508s fi-pnv-d510 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:662s fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:439s fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:530s fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:505s fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:501s fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:431s fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:446s fi-snb-2520m total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:569s fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:409s
Blacklisted hosts:
fi-cnl-psr total:285 pass:255 dwarn:3 dfail:0 fail:1 skip:26 time:514s
9fc36cf90e2648b9b98713efd56d342281551e50 drm-tip: 2018y-04m-04d-10h-41m-30s UTC integration manifest 06c0a462015a drm/i915: throw __must_check at GEM_WARN_ON
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8578/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915: throw __must_check at GEM_WARN_ON
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915: throw __must_check at GEM_WARN_ON
URL : https://patchwork.freedesktop.org/series/41136/
State : success
== Summary ==
---- Known issues:
Test kms_frontbuffer_tracking:
Subgroup fbc-farfromfence:
fail -> PASS (shard-apl) fdo#103167
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
shard-apl total:3498 pass:1834 dwarn:1 dfail:0 fail:7 skip:1655 time:12845s shard-hsw total:3498 pass:1785 dwarn:1 dfail:0 fail:1 skip:1710 time:11492s shard-snb total:3498 pass:1377 dwarn:1 dfail:0 fail:2 skip:2118 time:7060s
Blacklisted hosts:
shard-kbl total:3498 pass:1942 dwarn:19 dfail:1 fail:7 skip:1529 time:9263s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8578/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Matthew Auld (2018-04-04 14:19:04)
Quoted 9 lines
GEM_WARN_ONis intended to be used as:if (
GEM_WARN_ON(expr))...However this isn't clear since we just wrap
WARN_ON, therefore throw a warning if the result is ignored. For !DRM_I915_DEBUG_GEM builds this should already be the case.
Quoted 5 lines
Suggested-by Jani Nikula <[email protected]>Signed-off-by Matthew Auld <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Jani Nikula <[email protected]>Cc Chris Wilson <[email protected]>
I think this would be a worthwhile improvement.
Regards, Joonas
Quoted 27 lines
--- drivers/gpu/drm/i915/i915_gem.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.h +8
-1@@ -36,7 +36,14 @@BUG (); \ } \ }while (0 ) -#define GEM_WARN_ON (expr) WARN_ON(expr) + +static __always_inline bool __must_check __gem_warn_on(bool v) +{ +return WARN_ON (v); +} + +/* To be used as: if (GEM_WARN_ON(expr)) */ +#define GEM_WARN_ON (expr) __gem_warn_on(expr)#define GEM_DEBUG_DECL (var) var#define GEM_DEBUG_EXEC (expr) exprSignature · 1 line
2.14.3
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Joonas Lahtinen (2018-04-06 12:29:01)
Quoted 16 lines
Quoting Matthew Auld (2018-04-04 14:19:04)
Quoted 9 lines
GEM_WARN_ONis intended to be used as:if (
GEM_WARN_ON(expr))...However this isn't clear since we just wrap
WARN_ON, therefore throw a warning if the result is ignored. For !DRM_I915_DEBUG_GEM builds this should already be the case.Quoted 5 lines
Suggested-by Jani Nikula <[email protected]>Signed-off-by Matthew Auld <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Jani Nikula <[email protected]>Cc Chris Wilson <[email protected]>
Quoted 3 lines
Reviewed-by Joonas Lahtinen <[email protected]>I think this would be a worthwhile improvement.
At the very least may I beg for the GEM_TRACE output and #expr? #expr kind of defeats the use of an inline... Or at least requires more macro magic.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx