drm/i915: Mark wait_for_engine() as maybe_unused
Subsystems (2)
PATCH 1/1 drm/i915: Mark wait_for_engine() as maybe_unused
The only call of wait_for_engine() is wrapped in a GEM_WARN_ON macro, which confusingly suppresses the call unless CONFIG_DRM_I915_DEBUG_GEM is set.
According to http://www.spinics.net/lists/intel-gfx/msg128768.html the current behavior is correct, even though it's not obvious. Different solutions to improve GEM_WARN_ON were discussed, but no conclusion was reached.
Mark wait_for_engine() as maybe_unused to avoid a compiler warning, according to the above discussion this is still needed evein if GEM_WARN_ON is eventually refactored.
--- drivers/gpu/drm/i915/i915_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.c +2 -1
@@ -3364,7 +3364,8 @@ static int wait_for_timeline(struct i915_gem_timeline *tl, unsigned int flags)return 0 ; } -static int wait_for_engine (struct intel_engine_cs *engine,int timeout_ms) +static __maybe_unused int wait_for_engine ( +struct intel_engine_cs *engine,int timeout_ms) {return wait_for (intel_engine_is_idle (engine), timeout_ms); }
Signature · 6 lines
2.14.1.342.g6490525c54-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Mark wait_for_engine() as maybe_unused
== Series Details ==
== Series Details ==
Series: drm/i915: Mark wait_for_engine() as maybe_unused
URL : https://patchwork.freedesktop.org/series/29365/
State : success
== Summary ==
Series 29365v1 drm/i915: Mark wait_for_engine() as maybe_unused
https://patchwork.freedesktop.org/api/1.0/series/29365/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
fail -> PASS (fi-snb-2600) fdo#100007
Test kms_flip:
Subgroup basic-flip-vs-modeset:
skip -> PASS (fi-skl-x1585l) fdo#101781
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-byt-j1900) fdo#101705fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:279 pass:267 dwarn:1 dfail:0 fail:0 skip:11 time:458s fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:442s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:360s fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:553s fi-bwr-2160 total:279 pass:184 dwarn:0 dfail:0 fail:0 skip:95 time:253s fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:518s fi-byt-j1900 total:279 pass:255 dwarn:0 dfail:0 fail:0 skip:24 time:518s fi-byt-n2820 total:279 pass:250 dwarn:1 dfail:0 fail:0 skip:28 time:513s fi-elk-e7500 total:279 pass:230 dwarn:0 dfail:0 fail:0 skip:49 time:435s fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:616s fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:444s fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:423s fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:423s fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:497s fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:474s fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:472s fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:598s fi-kbl-r total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:594s fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:523s fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:470s fi-skl-6700k total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:482s fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:489s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:444s fi-skl-x1585l total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:506s fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:549s fi-snb-2600 total:279 pass:248 dwarn:0 dfail:0 fail:2 skip:29 time:407s
4823f19b979cd7b6a27a9d6861fa3e98c1e1fea2 drm-tip: 2017y-08m-25d-15h-55m-05s UTC integration manifest 513a406f75e5 drm/i915: Mark wait_for_engine() as maybe_unused
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5497/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: warning for drm/i915: Mark wait_for_engine() as maybe_unused
In reply to Matthias Kaehlcke== Series Details ==
== Series Details ==
Series: drm/i915: Mark wait_for_engine() as maybe_unused
URL : https://patchwork.freedesktop.org/series/29365/
State : warning
== Summary ==
Test kms_draw_crc:
Subgroup draw-method-xrgb8888-blt-untiled:
pass -> SKIP (shard-hsw)shard-hsw total:2230 pass:1229 dwarn:0 dfail:0 fail:18 skip:983 time:9537s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5497/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Matthias Kaehlcke
The only call of
wait_for_engine()is wrapped in aGEM_WARN_ONmacro, which confusingly suppresses the call unlessCONFIG_DRM_I915_DEBUG_GEMis set.According to http://www.spinics.net/lists/intel-gfx/msg128768.html the current behavior is correct, even though it's not obvious. Different solutions to improve
GEM_WARN_ONwere discussed, but no conclusion was reached.
Quoted 6 lines
Mark
wait_for_engine()asmaybe_unusedto avoid a compiler warning, according to the above discussion this is still needed evein ifGEM_WARN_ONis eventually refactored.Reported-by Nick Desaulniers <[email protected]>Signed-off-by Matthias Kaehlcke <[email protected]>
Seems to be taken care of already in
commit cad9946c2a4375386062131858881cfd30fc1b8f
Author: Chris Wilson <[email protected]> Date: Sat Aug 26 12:09:33 2017 +0100
drm/i915: Always sanity check engine state upon idling
Cheers, Daniel
Quoted 25 lines
--- drivers/gpu/drm/i915/i915_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +2
-1@@ -3364,7 +3364,8 @@ static int wait_for_timeline(struct i915_gem_timeline *tl, unsigned int flags)return 0 ; } -static int wait_for_engine (struct intel_engine_cs *engine,int timeout_ms) +static __maybe_unused int wait_for_engine ( +struct intel_engine_cs *engine,int timeout_ms) {return wait_for (intel_engine_is_idle (engine), timeout_ms); }Signature · 6 lines
2.14.1.342.g6490525c54-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx