Chris Wilson
14a0d527a4
drm/i915: Defer semaphore priority bumping to a workqueue
Since the semaphore fence may be signaled from inside an interrupt
handler from inside a request holding its request->lock, we cannot then
enter into the engine->active.lock for processing the semaphore priority
bump as we may traverse our call tree and end up on another held
request.
CPU 0:
[ 2243.218864] _raw_spin_lock_irqsave+0x9a/0xb0
[ 2243.218867] i915_schedule_bump_priority+0x49/0x80 [i915]
[ 2243.218869] semaphore_notify+0x6d/0x98 [i915]
[ 2243.218871] __i915_sw_fence_complete+0x61/0x420 [i915]
[ 2243.218874] ? kmem_cache_free+0x211/0x290
[ 2243.218876] i915_sw_fence_complete+0x58/0x80 [i915]
[ 2243.218879] dma_i915_sw_fence_wake+0x3e/0x80 [i915]
[ 2243.218881] signal_irq_work+0x571/0x690 [i915]
[ 2243.218883] irq_work_run_list+0xd7/0x120
[ 2243.218885] irq_work_run+0x1d/0x50
[ 2243.218887] smp_irq_work_interrupt+0x21/0x30
[ 2243.218889] irq_work_interrupt+0xf/0x20
CPU 1:
[ 2242.173107] _raw_spin_lock+0x8f/0xa0
[ 2242.173110] __i915_request_submit+0x64/0x4a0 [i915]
[ 2242.173112] __execlists_submission_tasklet+0x8ee/0x2120 [i915]
[ 2242.173114] ? i915_sched_lookup_priolist+0x1e3/0x2b0 [i915]
[ 2242.173117] execlists_submit_request+0x2e8/0x2f0 [i915]
[ 2242.173119] submit_notify+0x8f/0xc0 [i915]
[ 2242.173121] __i915_sw_fence_complete+0x61/0x420 [i915]
[ 2242.173124] ? _raw_spin_unlock_irqrestore+0x39/0x40
[ 2242.173137] i915_sw_fence_complete+0x58/0x80 [i915]
[ 2242.173140] i915_sw_fence_commit+0x16/0x20 [i915]
Closes: https://gitlab.freedesktop.org/drm/intel/issues/1318
Fixes: b7404c7ecb ("drm/i915: Bump ready tasks ahead of busywaits")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: <stable@vger.kernel.org> # v5.2+
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200310101720.9944-1-chris@chris-wilson.co.uk
(cherry picked from commit 209df10bb4)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2020-03-11 23:12:39 +02:00
..
2020-03-02 10:48:56 +02:00
2020-03-11 23:12:39 +02:00
2020-03-11 23:12:39 +02:00
2020-03-11 23:12:39 +02:00
2020-01-02 12:24:10 +02:00
2020-01-13 13:43:50 +02:00
2020-01-02 12:24:10 +02:00
2019-11-27 17:02:14 +00:00
2020-02-12 13:24:45 +02:00
2020-02-12 13:24:45 +02:00
2019-12-30 12:10:38 +00:00
2019-12-16 23:13:12 +00:00
2020-01-13 20:10:51 +02:00
2020-03-02 10:46:25 +02:00
2020-03-02 10:46:25 +02:00
2019-12-05 13:50:39 +00:00
2020-01-09 08:53:15 +00:00
2020-01-27 13:03:00 -08:00
2020-01-07 19:27:36 +00:00
2020-02-18 09:52:54 +02:00
2019-12-27 15:25:04 +10:00
2019-12-04 15:11:44 +00:00
2019-12-18 17:38:56 +00:00
2020-02-17 21:16:45 +02:00
2020-02-12 13:24:34 +02:00
2019-12-28 13:38:08 -08:00
2019-10-26 19:28:59 +01:00
2019-12-11 22:40:41 +00:00
2019-12-11 22:40:41 +00:00
2020-01-04 17:57:46 +00:00
2019-10-31 20:41:47 +00:00
2019-10-31 20:41:47 +00:00
2020-02-26 14:04:28 +02:00
2020-03-04 13:49:26 +02:00
2020-03-04 13:49:26 +02:00
2019-12-13 20:16:23 +00:00
2020-02-26 14:07:50 +02:00
2020-02-26 14:07:50 +02:00
2019-11-25 15:08:24 +02:00
2020-03-02 10:48:56 +02:00
2020-03-11 23:12:39 +02:00
2020-03-11 23:12:39 +02:00
2020-02-17 21:24:19 +02:00
2019-11-22 10:47:38 +00:00
2019-11-11 18:30:13 +00:00
2019-12-18 10:13:03 +00:00
2019-12-06 19:09:46 +00:00
2019-12-06 19:09:33 +00:00
2020-01-10 15:34:33 +00:00
2019-12-19 22:29:58 +02:00
2020-02-17 21:16:45 +02:00
2020-03-11 23:12:39 +02:00
2020-01-07 19:27:36 +00:00
2020-02-11 11:49:51 +02:00
2020-01-07 19:27:36 +00:00
2019-12-31 09:37:35 -08:00
2019-12-09 09:58:51 +00:00
2020-01-05 01:08:09 +00:00
2020-01-05 01:08:09 +00:00
2020-01-10 16:10:35 +02:00
2019-11-18 16:36:03 +02:00
2020-01-10 16:10:56 +02:00
2019-12-04 15:37:30 +02:00
2020-01-10 16:11:04 +02:00
2019-10-31 20:41:47 +00:00
2020-01-10 16:11:48 +02:00
2020-01-10 16:12:25 +02:00
2020-01-03 00:33:07 +00:00
2020-01-03 00:33:07 +00:00
2020-02-17 21:16:45 +02:00
2019-12-11 11:13:50 +02:00
2019-11-27 10:12:14 +02:00
2019-10-31 20:41:47 +00:00
2020-02-26 14:04:28 +02:00