Chris Wilson
4a0ca47a8e
drm/i915/gt: Suspend tasklets before resume sanitization
...
It is possible for a residual tasklet to be pending execution as we
resume (whether that's some prior test kicking off the tasklet, or if we
are in a suspend/resume stress test). As such, we do not want that
tasklet to execute in the middle of our sanitization, such that it sees
the poisoned state. For example,
<4>[ 449.386553] invalid opcode: 0000 [#1 ] PREEMPT SMP NOPTI
<4>[ 449.386555] CPU: 1 PID: 5115 Comm: i915_selftest Tainted: G U W 5.7.0-rc4-CI-CI_DRM_8472+ #1
<4>[ 449.386556] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3183.A00.1905020411 05/02/2019
<4>[ 449.386585] RIP: 0010:process_csb+0x6bf/0x830 [i915]
<4>[ 449.386588] Code: 00 48 c7 c2 10 bc 4c a0 48 c7 c7 d4 75 34 a0 e8 87 0e e6 e0 bf 01 00 00 00 e8 9d e0 e5 e0 31 f6 bf 09 00 00 00 e8 e1 ba d6 e0 <0f> 0b 8b 87 10 05 00 00 85 c0 0f 85 5f f9 ff ff 48 c7 c1 70 a5 4f
<4>[ 449.386591] RSP: 0018:ffffc90000170ea0 EFLAGS: 00010297
<4>[ 449.386594] RAX: 0000000080000101 RBX: 0000000000000000 RCX: 0000000000000000
<4>[ 449.386596] RDX: ffff88849d5bc040 RSI: 0000000000000000 RDI: 0000000000000009
<4>[ 449.386598] RBP: ffffc90000170f00 R08: 0000000000000000 R09: 0000000000000000
<4>[ 449.386600] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88843ccea018
<4>[ 449.386602] R13: ffff88843ccea658 R14: ffff88843ccea640 R15: ffff88843ccea000
<4>[ 449.386605] FS: 00007f826a813300(0000) GS:ffff88849fe80000(0000) knlGS:0000000000000000
<4>[ 449.386607] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4>[ 449.386609] CR2: 0000560366b94280 CR3: 000000048ba02002 CR4: 0000000000760ee0
<4>[ 449.386611] PKRU: 55555554
<4>[ 449.386613] Call Trace:
<4>[ 449.386616] <IRQ>
<4>[ 449.386646] ? execlists_submission_tasklet+0xcf/0x140 [i915]
<4>[ 449.386674] execlists_submission_tasklet+0x2f/0x140 [i915]
<4>[ 449.386679] tasklet_action_common.isra.16+0x6c/0x1c0
<4>[ 449.386684] __do_softirq+0xdf/0x49e
<4>[ 449.386687] irq_exit+0xba/0xc0
<4>[ 449.386690] smp_apic_timer_interrupt+0xb7/0x280
<4>[ 449.386693] apic_timer_interrupt+0xf/0x20
<4>[ 449.386695] </IRQ>
<4>[ 449.386698] RIP: 0010:_raw_spin_unlock_irqrestore+0x49/0x60
<4>[ 449.386701] Code: c7 02 75 1f 53 9d e8 26 ab 75 ff bf 01 00 00 00 e8 7c a3 69 ff 65 8b 05 7d 9b 5c 7e 85 c0 74 0c 5b 5d c3 e8 09 aa 75 ff 53 9d <eb> df e8 ca 39 5b ff 5b 5d c3 0f 1f 00 66 2e 0f 1f 84 00 00 00 00
<4>[ 449.386703] RSP: 0018:ffffc90000a6b950 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13
<4>[ 449.386706] RAX: 0000000080000001 RBX: 0000000000000202 RCX: 0000000000000000
<4>[ 449.386708] RDX: ffff88849d5bc040 RSI: ffff88849d5bc900 RDI: ffffffff82386f12
<4>[ 449.386710] RBP: ffff88847d400f00 R08: ffff88849d5bc900 R09: 0000000000000000
<4>[ 449.386712] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffff0b0b
<4>[ 449.386714] R13: 000000000000000c R14: ffff88847d40bf70 R15: ffff88847d40cef8
<4>[ 449.386742] reset_csb_pointers+0x59/0x140 [i915]
<4>[ 449.386769] execlists_sanitize+0x3e/0x60 [i915]
<4>[ 449.386797] gt_sanitize+0xd6/0x260 [i915]
As part of the reset preparation, engine->reset.prepare() prevents the
tasklet from running, so pull the sanitization inside the critical
section for reset.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1812
Fixes: 23122a4d992b ("drm/i915/gt: Scrub execlists state on resume")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200513122826.27484-1-chris@chris-wilson.co.uk
2020-05-13 17:13:16 +01:00
..
2020-04-16 14:52:59 +03:00
2020-02-26 13:31:23 +02:00
2020-03-06 11:25:58 +08:00
2020-03-06 14:19:58 +01:00
2019-08-14 19:27:26 +02:00
2020-03-02 09:22:43 +01:00
2020-02-26 13:31:23 +02:00
2020-03-31 15:15:47 +10:00
2020-04-09 10:29:35 +02:00
2020-02-12 10:24:08 +01:00
2020-03-20 18:40:44 +01:00
2020-04-09 10:29:35 +02:00
2020-02-26 13:31:23 +02:00
2020-03-06 14:19:58 +01:00
2020-03-11 07:27:21 +10:00
2020-02-26 13:31:23 +02:00
2019-12-05 08:44:12 +01:00
2020-05-13 17:13:16 +01:00
2020-02-26 13:31:23 +02:00
2020-02-26 13:31:23 +02:00
2020-02-21 05:44:40 +10:00
2020-02-26 13:31:23 +02:00
2020-04-02 15:50:04 -07:00
2020-03-10 10:51:24 +01:00
2019-12-05 08:44:16 +01:00
2020-03-02 09:22:49 +01:00
2020-04-08 11:00:00 -07:00
2019-12-09 22:57:26 +01:00
2020-04-07 20:24:34 -07:00
2020-04-03 15:05:35 -07:00
2020-03-25 21:59:22 +01:00
2020-03-12 12:42:56 +10:00
2020-02-16 14:31:30 +01:00
2020-03-02 09:22:56 +01:00
2019-12-05 08:44:23 +01:00
2020-04-03 14:25:02 -07:00
2020-02-26 13:31:23 +02:00
2020-04-09 10:29:35 +02:00
2019-12-05 08:44:34 +01:00
2020-03-26 10:22:36 -04:00
2020-02-12 18:32:54 +01:00
2019-12-05 08:44:55 +01:00
2020-02-26 13:31:23 +02:00
2020-02-26 13:31:23 +02:00
2020-03-11 07:27:21 +10:00
2019-12-05 08:45:01 +01:00
2020-03-19 10:11:09 +10:00
2020-02-28 14:48:58 +02:00
2020-02-26 13:31:23 +02:00
2020-03-14 08:31:30 +01:00
2020-04-10 12:38:28 -07:00
2019-12-09 22:57:26 +01:00
2020-02-10 09:24:09 +01:00
2020-03-04 22:15:34 -08:00
2020-03-26 17:03:03 +01:00
2020-03-27 13:38:47 +01:00
2020-02-06 19:04:41 +01:00
2020-01-31 12:16:36 -08:00
2020-04-06 15:10:37 +02:00
2020-02-13 13:10:10 +01:00
2020-04-03 09:07:49 +10:00
2020-03-31 17:14:51 +02:00
2020-01-28 15:43:58 +01:00
2019-11-04 18:17:36 +01:00
2020-01-31 16:39:53 +01:00
2020-02-15 13:21:22 +01:00
2019-12-22 11:13:00 +01:00
2020-02-18 16:50:45 +01:00
2020-01-29 09:14:11 +01:00
2019-10-09 20:04:55 +02:00
2020-02-26 13:31:41 +02:00
2020-02-26 13:31:41 +02:00
2020-03-16 09:26:18 +01:00
2019-10-25 09:35:06 +02:00
2020-03-11 07:27:21 +10:00
2020-02-29 00:16:12 +01:00
2019-11-29 21:29:17 +02:00
2020-02-26 13:31:18 +02:00
2020-03-16 09:23:55 +01:00
2019-09-16 15:13:02 -07:00
2020-02-15 21:15:17 +01:00
2020-01-14 16:22:17 -05:00
2019-10-08 09:41:06 -04:00
2020-01-28 16:49:22 +01:00
2020-01-25 15:49:11 +02:00
2020-01-18 10:33:12 +01:00
2020-01-09 18:07:46 -05:00
2019-10-08 18:29:00 +02:00
2020-04-16 14:52:59 +03:00
2019-09-03 19:30:06 -04:00
2020-03-31 15:15:47 +10:00
2020-02-11 15:03:09 +01:00
2019-09-30 20:15:53 +03:00
2019-08-07 11:56:48 -04:00
2019-10-02 16:28:55 +03:00
2020-03-16 10:54:08 +01:00
2019-12-09 10:03:01 +01:00
2020-01-09 17:33:41 +01:00
2020-03-06 14:19:57 +01:00
2020-03-24 18:50:35 +01:00
2020-02-17 10:27:13 +01:00
2019-11-28 11:19:32 +01:00
2020-01-14 16:22:17 -05:00
2019-12-19 15:55:10 +02:00
2020-03-02 07:13:19 +01:00
2019-11-15 08:00:08 +01:00
2020-02-06 10:32:54 +01:00
2020-03-16 10:31:35 +00:00
2020-03-04 06:33:00 +05:30
2020-03-04 06:33:00 +05:30
2020-01-14 16:22:17 -05:00
2020-02-11 18:39:47 +02:00
2019-08-22 10:41:06 +03:00
2020-03-18 14:42:18 +01:00
2020-03-16 09:27:09 +01:00
2019-09-30 20:16:28 +03:00
2020-01-30 09:00:45 +01:00
2019-11-07 15:00:16 +02:00
2020-03-31 17:35:56 +02:00
2019-11-21 11:03:31 +01:00
2019-11-04 18:17:36 +01:00
2020-02-12 18:32:54 +01:00
2019-12-18 02:40:16 +02:00
2019-12-17 20:39:33 +01:00
2020-03-09 09:22:50 +00:00
2020-04-05 10:44:12 -04:00
2019-11-14 14:08:57 +02:00
2019-12-09 10:02:45 +01:00
2019-12-04 19:44:13 -08:00
2019-11-28 13:15:43 +01:00
2020-02-29 00:16:12 +01:00
2019-11-06 13:00:21 -05:00
2020-03-06 09:24:29 +01:00
2020-01-20 14:22:21 +01:00
2020-03-11 14:54:09 +01:00
2019-09-03 09:46:18 +02:00
2020-03-06 09:24:54 +01:00
2020-03-16 09:25:22 +01:00
2019-09-12 19:54:42 +02:00
2019-09-23 15:32:53 +08:00
2020-03-06 11:15:43 +00:00
2020-02-26 13:31:41 +02:00