* [PATCH] drm/i915: Lie and treat all engines as idle if wedged
@ 2017-04-10 16:24 Chris Wilson
2017-04-11 8:23 ` Joonas Lahtinen
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-04-10 16:24 UTC (permalink / raw)
To: intel-gfx
Similar to commit 8490ae207f1d ("drm/i915: Suppress busy status for
engines if wedged") we also want to report intel_engine_is_idle() as
true as well as the main intel_engines_are_idle(), as we now check that
the engines are idle when overwriting the HWS page. This is not true
whilst we are setting the device as wedged, at least according to our
bookkeeping, so we have to lie to ourselves!
[ 383.588601] [drm:i915_reset [i915]] *ERROR* Failed to reset chip: -110
[ 383.588685] ------------[ cut here ]------------
[ 383.588755] WARNING: CPU: 0 PID: 12 at drivers/gpu/drm/i915/intel_engine_cs.c:226 intel_engine_init_global_seqno+0x222/0x290 [i915]
[ 383.588757] WARN_ON(!intel_engine_is_idle(engine))
[ 383.588759] Modules linked in: ctr ccm snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core arc4 iwldvm mac80211 snd_pcm snd_hwdep snd_seq_midi snd_seq_midi_event rfcomm bnep snd_rawmidi intel_powerclamp coretemp dm_multipath iwlwifi crct10dif_pclmul snd_seq crc32_pclmul ghash_clmulni_intel btusb aesni_intel btrtl btbcm aes_x86_64 crypto_simd cryptd btintel snd_timer glue_helper bluetooth intel_ips snd_seq_device cfg80211 snd soundcore binfmt_misc mei_me mei dm_mirror dm_region_hash dm_log i915 intel_gtt i2c_algo_bit drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea prime_numbers ahci libahci drm e1000e
[ 383.588851] CPU: 0 PID: 12 Comm: migration/0 Not tainted 4.11.0-rc5+ #207
[ 383.588853] Hardware name: LENOVO 514328U/514328U, BIOS 6QET44WW (1.14 ) 04/20/2010
[ 383.588855] Call Trace:
[ 383.588866] dump_stack+0x63/0x90
[ 383.588871] __warn+0xc7/0xf0
[ 383.588876] warn_slowpath_fmt+0x4a/0x50
[ 383.588883] ? set_next_entity+0x821/0x910
[ 383.588943] intel_engine_init_global_seqno+0x222/0x290 [i915]
[ 383.588998] __i915_gem_set_wedged_BKL+0xa4/0x190 [i915]
[ 383.589003] ? __switch_to+0x215/0x390
[ 383.589008] multi_cpu_stop+0xbb/0xe0
[ 383.589012] ? cpu_stop_queue_work+0x90/0x90
[ 383.589016] cpu_stopper_thread+0x82/0x110
[ 383.589021] smpboot_thread_fn+0x137/0x190
[ 383.589026] kthread+0xf7/0x130
[ 383.589030] ? sort_range+0x20/0x20
[ 383.589034] ? kthread_park+0x90/0x90
[ 383.589040] ret_from_fork+0x2c/0x40
Fixes: 2ca9faa551c4 ("drm/i915: Assert the engine is idle before overwiting the HWS")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index 9b7771d7fe24..94772c1c1999 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1078,6 +1078,10 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
{
struct drm_i915_private *dev_priv = engine->i915;
+ /* More white lies, if wedged, hw state is inconsistent */
+ if (i915_terminally_wedged(&dev_priv->gpu_error))
+ return true;
+
/* We have to allow time for writes to land from the GPU. */
if (engine->irq_seqno_barrier)
engine->irq_seqno_barrier(engine);
--
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] 5+ messages in thread
* Re: [PATCH] drm/i915: Lie and treat all engines as idle if wedged
2017-04-10 16:24 [PATCH] drm/i915: Lie and treat all engines as idle if wedged Chris Wilson
@ 2017-04-11 8:23 ` Joonas Lahtinen
2017-04-11 19:00 ` Chris Wilson
2017-04-11 19:40 ` ✓ Fi.CI.BAT: success for drm/i915: Lie and treat all engines as idle if wedged (rev2) Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Joonas Lahtinen @ 2017-04-11 8:23 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On ma, 2017-04-10 at 17:24 +0100, Chris Wilson wrote:
> Similar to commit 8490ae207f1d ("drm/i915: Suppress busy status for
> engines if wedged") we also want to report intel_engine_is_idle() as
> true as well as the main intel_engines_are_idle(), as we now check that
> the engines are idle when overwriting the HWS page. This is not true
> whilst we are setting the device as wedged, at least according to our
> bookkeeping, so we have to lie to ourselves!
>
> [ 383.588601] [drm:i915_reset [i915]] *ERROR* Failed to reset chip: -110
> [ 383.588685] ------------[ cut here ]------------
> [ 383.588755] WARNING: CPU: 0 PID: 12 at drivers/gpu/drm/i915/intel_engine_cs.c:226 intel_engine_init_global_seqno+0x222/0x290 [i915]
> [ 383.588757] WARN_ON(!intel_engine_is_idle(engine))
> [ 383.588759] Modules linked in: ctr ccm snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core arc4 iwldvm mac80211 snd_pcm snd_hwdep snd_seq_midi snd_seq_midi_event rfcomm bnep snd_rawmidi intel_powerclamp coretemp dm_multipath iwlwifi crct10dif_pclmul snd_seq crc32_pclmul ghash_clmulni_intel btusb aesni_intel btrtl btbcm aes_x86_64 crypto_simd cryptd btintel snd_timer glue_helper bluetooth intel_ips snd_seq_device cfg80211 snd soundcore binfmt_misc mei_me mei dm_mirror dm_region_hash dm_log i915 intel_gtt i2c_algo_bit drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea prime_numbers ahci libahci drm e1000e
> [ 383.588851] CPU: 0 PID: 12 Comm: migration/0 Not tainted 4.11.0-rc5+ #207
> [ 383.588853] Hardware name: LENOVO 514328U/514328U, BIOS 6QET44WW (1.14 ) 04/20/2010
> [ 383.588855] Call Trace:
> [ 383.588866] dump_stack+0x63/0x90
> [ 383.588871] __warn+0xc7/0xf0
> [ 383.588876] warn_slowpath_fmt+0x4a/0x50
> [ 383.588883] ? set_next_entity+0x821/0x910
> [ 383.588943] intel_engine_init_global_seqno+0x222/0x290 [i915]
> [ 383.588998] __i915_gem_set_wedged_BKL+0xa4/0x190 [i915]
> [ 383.589003] ? __switch_to+0x215/0x390
> [ 383.589008] multi_cpu_stop+0xbb/0xe0
> [ 383.589012] ? cpu_stop_queue_work+0x90/0x90
> [ 383.589016] cpu_stopper_thread+0x82/0x110
> [ 383.589021] smpboot_thread_fn+0x137/0x190
> [ 383.589026] kthread+0xf7/0x130
> [ 383.589030] ? sort_range+0x20/0x20
> [ 383.589034] ? kthread_park+0x90/0x90
> [ 383.589040] ret_from_fork+0x2c/0x40
>
> Fixes: 2ca9faa551c4 ("drm/i915: Assert the engine is idle before overwiting the HWS")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Makes sense if hoisting the check would spread it all over.
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] 5+ messages in thread
* [PATCH] drm/i915: Lie and treat all engines as idle if wedged
2017-04-10 16:24 [PATCH] drm/i915: Lie and treat all engines as idle if wedged Chris Wilson
2017-04-11 8:23 ` Joonas Lahtinen
@ 2017-04-11 19:00 ` Chris Wilson
2017-04-11 19:40 ` ✓ Fi.CI.BAT: success for drm/i915: Lie and treat all engines as idle if wedged (rev2) Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-04-11 19:00 UTC (permalink / raw)
To: intel-gfx
Similar to commit 8490ae207f1d ("drm/i915: Suppress busy status for
engines if wedged") we also want to report intel_engine_is_idle() as
true as well as the main intel_engines_are_idle(), as we now check that
the engines are idle when overwriting the HWS page. This is not true
whilst we are setting the device as wedged, at least according to our
bookkeeping, so we have to lie to ourselves!
[ 383.588601] [drm:i915_reset [i915]] *ERROR* Failed to reset chip: -110
[ 383.588685] ------------[ cut here ]------------
[ 383.588755] WARNING: CPU: 0 PID: 12 at drivers/gpu/drm/i915/intel_engine_cs.c:226 intel_engine_init_global_seqno+0x222/0x290 [i915]
[ 383.588757] WARN_ON(!intel_engine_is_idle(engine))
[ 383.588759] Modules linked in: ctr ccm snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core arc4 iwldvm mac80211 snd_pcm snd_hwdep snd_seq_midi snd_seq_midi_event rfcomm bnep snd_rawmidi intel_powerclamp coretemp dm_multipath iwlwifi crct10dif_pclmul snd_seq crc32_pclmul ghash_clmulni_intel btusb aesni_intel btrtl btbcm aes_x86_64 crypto_simd cryptd btintel snd_timer glue_helper bluetooth intel_ips snd_seq_device cfg80211 snd soundcore binfmt_misc mei_me mei dm_mirror dm_region_hash dm_log i915 intel_gtt i2c_algo_bit drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea prime_numbers ahci libahci drm e1000e
[ 383.588851] CPU: 0 PID: 12 Comm: migration/0 Not tainted 4.11.0-rc5+ #207
[ 383.588853] Hardware name: LENOVO 514328U/514328U, BIOS 6QET44WW (1.14 ) 04/20/2010
[ 383.588855] Call Trace:
[ 383.588866] dump_stack+0x63/0x90
[ 383.588871] __warn+0xc7/0xf0
[ 383.588876] warn_slowpath_fmt+0x4a/0x50
[ 383.588883] ? set_next_entity+0x821/0x910
[ 383.588943] intel_engine_init_global_seqno+0x222/0x290 [i915]
[ 383.588998] __i915_gem_set_wedged_BKL+0xa4/0x190 [i915]
[ 383.589003] ? __switch_to+0x215/0x390
[ 383.589008] multi_cpu_stop+0xbb/0xe0
[ 383.589012] ? cpu_stop_queue_work+0x90/0x90
[ 383.589016] cpu_stopper_thread+0x82/0x110
[ 383.589021] smpboot_thread_fn+0x137/0x190
[ 383.589026] kthread+0xf7/0x130
[ 383.589030] ? sort_range+0x20/0x20
[ 383.589034] ? kthread_park+0x90/0x90
[ 383.589040] ret_from_fork+0x2c/0x40
Fixes: 2ca9faa551c4 ("drm/i915: Assert the engine is idle before overwiting the HWS")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index 15970f1b09d2..ee87ca7420de 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1131,6 +1131,10 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
{
struct drm_i915_private *dev_priv = engine->i915;
+ /* More white lies, if wedged, hw state is inconsistent */
+ if (i915_terminally_wedged(&dev_priv->gpu_error))
+ return true;
+
/* Any inflight/incomplete requests? */
if (!i915_seqno_passed(intel_engine_get_seqno(engine),
intel_engine_last_submit(engine)))
--
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] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Lie and treat all engines as idle if wedged (rev2)
2017-04-10 16:24 [PATCH] drm/i915: Lie and treat all engines as idle if wedged Chris Wilson
2017-04-11 8:23 ` Joonas Lahtinen
2017-04-11 19:00 ` Chris Wilson
@ 2017-04-11 19:40 ` Patchwork
2017-04-11 19:52 ` Chris Wilson
2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2017-04-11 19:40 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Lie and treat all engines as idle if wedged (rev2)
URL : https://patchwork.freedesktop.org/series/22793/
State : success
== Summary ==
Series 22793v2 drm/i915: Lie and treat all engines as idle if wedged
https://patchwork.freedesktop.org/api/1.0/series/22793/revisions/2/mbox/
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:430s
fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:430s
fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:575s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:508s
fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:485s
fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:478s
fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:411s
fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:406s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:419s
fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:492s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:466s
fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:453s
fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:568s
fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:457s
fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:572s
fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:459s
fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:486s
fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:432s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:537s
fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:401s
c77055e7cbbc6f925498f386c498bd0f2d7c6bdb drm-tip: 2017y-04m-11d-18h-46m-29s UTC integration manifest
2f720db drm/i915: Lie and treat all engines as idle if wedged
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4480/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ✓ Fi.CI.BAT: success for drm/i915: Lie and treat all engines as idle if wedged (rev2)
2017-04-11 19:40 ` ✓ Fi.CI.BAT: success for drm/i915: Lie and treat all engines as idle if wedged (rev2) Patchwork
@ 2017-04-11 19:52 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-04-11 19:52 UTC (permalink / raw)
To: intel-gfx
On Tue, Apr 11, 2017 at 07:40:58PM -0000, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915: Lie and treat all engines as idle if wedged (rev2)
> URL : https://patchwork.freedesktop.org/series/22793/
> State : success
>
> == Summary ==
>
> Series 22793v2 drm/i915: Lie and treat all engines as idle if wedged
> https://patchwork.freedesktop.org/api/1.0/series/22793/revisions/2/mbox/
Another invisible bug (hopefully) bites the dust. Thanks for the review,
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-11 19:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-10 16:24 [PATCH] drm/i915: Lie and treat all engines as idle if wedged Chris Wilson
2017-04-11 8:23 ` Joonas Lahtinen
2017-04-11 19:00 ` Chris Wilson
2017-04-11 19:40 ` ✓ Fi.CI.BAT: success for drm/i915: Lie and treat all engines as idle if wedged (rev2) Patchwork
2017-04-11 19:52 ` 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.