Skip to contentSkip to conversation

drm/i915/gt: Fix a lockdep warning on RT kernel

PATCH In review Jun Miao 3 participants 6 messages Apr 15, 2021 – Apr 19, 2021

Subsystems (2)
lore
Share & tools
lore

Jun Miao

author
#0 lore raw

PATCH v2 1/1 drm/i915/gt: Fix a lockdep warning on RT kernel

Don`t simple disable all the HD-irq, should race the region in the intel_breadcrumbs_disarm_irq() only.

BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:969
  #0: ffff89c4c00ca970 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1cf/0x6d0
  #1: ffffa433c1f53e60 ((work_completion)(&engine->retire_work)){+.+.}-{0:0}, at: process_one_work+0x1cf 0x6d
  #2: ffff89c4ccb0a0a8 (kernel_context){+.+.}-{0:0}, at: engine_retire+0x62/0x110 [i915]
  #3: ffff89c4cf682300 (wakeref.mutex#3){+.+.}-{0:0}, at: __intel_wakeref_put_last+0x20/0x60 [i915]
  #4: ffff89c4ccb08398 (&b->irq_lock){+.+.}-{0:0}, at: intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
 irq event stamp: 2126
 hardirqs last  enabled at (2125): [<ffffffffbb134739>] cancel_delayed_work+0xa9/0xc0
 hardirqs last disabled at (2126): [<ffffffffc0507fe6>] __intel_breadcrumbs_park+0x76/0x80 [i915]
 softirqs last  enabled at (0): [<ffffffffbb1099ce>] copy_process+0x63e/0x1630
 softirqs last disabled at (0): [<0000000000000000>] 0x0
 CPU: 3 PID: 281 Comm: kworker/3:3 Not tainted 5.10.27-rt34-yocto-preempt-rt #1
 Hardware name: Intel(R) Client Systems NUC7i5DNKE/NUC7i5DNB, BIOS DNKBLi5v.86A.0064.2019.0523.1933 05/23 2019
 Workqueue: events engine_retire [i915]
 Call Trace:
  show_stack+0x52/0x58
  dump_stack+0x7d/0x9f
  ___might_sleep.cold+0xe3/0xf4
  rt_spin_lock+0x3f/0xc0
  ? intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
  intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
  signal_irq_work+0x241/0x660 [i915]
  ? __this_cpu_preempt_check+0x13/0x20
  ? lockdep_hardirqs_off+0x106/0x120
  __intel_breadcrumbs_park+0x3f/0x80 [i915]
  __engine_park+0xbd/0xe0 [i915]
  ____intel_wakeref_put_last+0x22/0x60 [i915]
  __intel_wakeref_put_last+0x50/0x60 [i915]
  intel_context_exit_engine+0x5f/0x70 [i915]
  i915_request_retire+0x139/0x2d0 [i915]
  engine_retire+0xb0/0x110 [i915]
  process_one_work+0x26d/0x6d0
  worker_thread+0x53/0x330
  kthread+0x1b0/0x1d0
  ? process_one_work+0x6d0/0x6d0
  ? __kthread_parkme+0xc0/0xc0
  ret_from_fork+0x22/0x30
Fixes 9d5612ca165a ("drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission")
---
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +4 -4
index 34a645d..0589b1a 100644
@@ -103,10 +103,12 @@ static void __intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
 
 static void intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
 {
-	spin_lock(&b->irq_lock);
+	unsigned long flags;
+
+	spin_lock_irqsave(&b->irq_lock, flags);
 	if (b->irq_armed)
 		__intel_breadcrumbs_disarm_irq(b);
-	spin_unlock(&b->irq_lock);
+	spin_unlock_irqrestore(&b->irq_lock, flags);
 }
 
 static void add_signaling_context(struct intel_breadcrumbs *b,
@@ -337,9 +339,7 @@ void __intel_breadcrumbs_park(struct intel_breadcrumbs *b)
 	/* Kick the work once more to drain the signalers, and disarm the irq */
 	irq_work_sync(&b->irq_work);
 	while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) {
-		local_irq_disable();
 		signal_irq_work(&b->irq_work);
-		local_irq_enable();
 		cond_resched();
 	}
 }
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915/gt: Fix a lockdep warning on RT kernel

== Series Details ==

== Series Details ==

Series: drm/i915/gt: Fix a lockdep warning on RT kernel
URL : https://patchwork.freedesktop.org/series/89108/
State : warning

== Summary ==

$ make htmldocs 2>&1 > /dev/null | grep i915
./drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:102: warning: Function parameter or member 'ww' not described in 'i915_gem_shrink'
./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser'
./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser'
./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser'
./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Fix a lockdep warning on RT kernel

In reply to Jun Miao
== Series Details ==

== Series Details ==

Series: drm/i915/gt: Fix a lockdep warning on RT kernel
URL : https://patchwork.freedesktop.org/series/89108/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9973 -> Patchwork_19941
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_19941 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_19941, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_19941:

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_create@basic:
- fi-ivb-3770: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-ivb-3770/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-ivb-3770/igt@[email protected]

* igt@gem_exec_fence@basic-busy@rcs0:
- fi-kbl-x1275: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-x1275/igt@gem_exec_fence@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-x1275/igt@gem_exec_fence@[email protected]

* igt@gem_exec_fence@basic-busy@vecs0:
- fi-cfl-8700k: [PASS][5] -> [DMESG-WARN][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-cfl-8700k/igt@gem_exec_fence@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cfl-8700k/igt@gem_exec_fence@[email protected]
- fi-cml-s: [PASS][7] -> [DMESG-WARN][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-cml-s/igt@gem_exec_fence@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cml-s/igt@gem_exec_fence@[email protected]
- fi-cfl-guc: [PASS][9] -> [DMESG-WARN][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-cfl-guc/igt@gem_exec_fence@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cfl-guc/igt@gem_exec_fence@[email protected]

* igt@gem_exec_fence@basic-wait@rcs0:
- fi-bsw-n3050: [PASS][11] -> [DMESG-WARN][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-bsw-n3050/igt@gem_exec_fence@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bsw-n3050/igt@gem_exec_fence@[email protected]

* igt@gem_exec_fence@basic-wait@vcs0:
- fi-skl-6700k2: [PASS][13] -> [DMESG-WARN][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-skl-6700k2/igt@gem_exec_fence@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-6700k2/igt@gem_exec_fence@[email protected]

* igt@gem_exec_gttfill@basic:
- fi-skl-guc: [PASS][15] -> [DMESG-WARN][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-skl-guc/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-guc/igt@[email protected]
- fi-hsw-4770: [PASS][17] -> [DMESG-WARN][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-hsw-4770/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-hsw-4770/igt@[email protected]
- fi-tgl-u2: [PASS][19] -> [DMESG-WARN][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-tgl-u2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-tgl-u2/igt@[email protected]

* igt@gem_exec_parallel@engines@fds:
- fi-apl-guc: [PASS][21] -> [DMESG-WARN][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-apl-guc/igt@gem_exec_parallel@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-apl-guc/igt@gem_exec_parallel@[email protected]

* igt@i915_selftest@live@dmabuf:
- fi-snb-2520m: [PASS][23] -> [DMESG-FAIL][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-snb-2520m/igt@i915_selftest@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-snb-2520m/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@execlists:
- fi-glk-dsi: [PASS][25] -> [DMESG-FAIL][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-glk-dsi/igt@i915_selftest@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-glk-dsi/igt@i915_selftest@[email protected]
- fi-skl-6600u: NOTRUN -> [DMESG-FAIL][27]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-6600u/igt@i915_selftest@[email protected]
- fi-cml-u2: [PASS][28] -> [DMESG-FAIL][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-cml-u2/igt@i915_selftest@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cml-u2/igt@i915_selftest@[email protected]
- fi-kbl-7500u: [PASS][30] -> [DMESG-WARN][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-7500u/igt@i915_selftest@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-7500u/igt@i915_selftest@[email protected]
- fi-kbl-8809g: [PASS][32] -> [DMESG-FAIL][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-8809g/igt@i915_selftest@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-8809g/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@gem_contexts:
- fi-bsw-nick: [PASS][34] -> [DMESG-WARN][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-bsw-nick/igt@i915_selftest@live@gem_contexts.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bsw-nick/igt@i915_selftest@live@gem_contexts.html

* igt@i915_selftest@live@gem_execbuf:
- fi-bsw-nick: [PASS][36] -> [DMESG-FAIL][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-bsw-nick/igt@i915_selftest@live@gem_execbuf.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bsw-nick/igt@i915_selftest@live@gem_execbuf.html

* igt@i915_selftest@live@gt_contexts:
- fi-icl-y: NOTRUN -> [DMESG-FAIL][38]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@i915_selftest@live@gt_contexts.html

* igt@i915_selftest@live@gt_heartbeat:
- fi-bxt-dsi: [PASS][39] -> [DMESG-FAIL][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-bxt-dsi/igt@i915_selftest@live@gt_heartbeat.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bxt-dsi/igt@i915_selftest@live@gt_heartbeat.html
- fi-icl-u2: [PASS][41] -> [DMESG-FAIL][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-icl-u2/igt@i915_selftest@live@gt_heartbeat.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-u2/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@gt_pm:
- fi-icl-u2: [PASS][43] -> [DMESG-WARN][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-icl-u2/igt@i915_selftest@live@gt_pm.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-u2/igt@i915_selftest@live@gt_pm.html
- fi-bxt-dsi: [PASS][45] -> [DMESG-WARN][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-bxt-dsi/igt@i915_selftest@live@gt_pm.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bxt-dsi/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@gt_timelines:
- fi-kbl-guc: [PASS][47] -> [DMESG-WARN][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-guc/igt@i915_selftest@live@gt_timelines.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-guc/igt@i915_selftest@live@gt_timelines.html
- fi-kbl-r: [PASS][49] -> [DMESG-WARN][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-r/igt@i915_selftest@live@gt_timelines.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-r/igt@i915_selftest@live@gt_timelines.html
- fi-cfl-8109u: [PASS][51] -> [DMESG-WARN][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-cfl-8109u/igt@i915_selftest@live@gt_timelines.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cfl-8109u/igt@i915_selftest@live@gt_timelines.html
- fi-icl-y: NOTRUN -> [DMESG-WARN][53]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@i915_selftest@live@gt_timelines.html
- fi-bsw-kefka: [PASS][54] -> [DMESG-WARN][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-bsw-kefka/igt@i915_selftest@live@gt_timelines.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bsw-kefka/igt@i915_selftest@live@gt_timelines.html

* igt@i915_selftest@live@hangcheck:
- fi-cml-u2: [PASS][56] -> [DMESG-WARN][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-cml-u2/igt@i915_selftest@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cml-u2/igt@i915_selftest@[email protected]
- fi-skl-6600u: NOTRUN -> [DMESG-WARN][58]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-6600u/igt@i915_selftest@[email protected]
- fi-kbl-8809g: [PASS][59] -> [DMESG-WARN][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-8809g/igt@i915_selftest@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-8809g/igt@i915_selftest@[email protected]
- fi-glk-dsi: [PASS][61] -> [DMESG-WARN][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-glk-dsi/igt@i915_selftest@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-glk-dsi/igt@i915_selftest@[email protected]
- fi-tgl-y: [PASS][63] -> [DMESG-WARN][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-tgl-y/igt@i915_selftest@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-tgl-y/igt@i915_selftest@[email protected]
- fi-kbl-soraka: [PASS][65] -> [DMESG-WARN][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-soraka/igt@i915_selftest@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-soraka/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@mman:
- fi-snb-2520m: [PASS][67] -> [DMESG-WARN][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-snb-2520m/igt@i915_selftest@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-snb-2520m/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@ring_submission:
- fi-kbl-7500u: [PASS][69] -> [DMESG-FAIL][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-7500u/igt@i915_selftest@live@ring_submission.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-7500u/igt@i915_selftest@live@ring_submission.html

* igt@runner@aborted:
- fi-bsw-n3050: NOTRUN -> [FAIL][71]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bsw-n3050/igt@[email protected]
- fi-tgl-u2: NOTRUN -> [FAIL][72]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-tgl-u2/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@i915_selftest@live@gt_contexts:
- {fi-rkl-11500t}: [PASS][73] -> [DMESG-FAIL][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-rkl-11500t/igt@i915_selftest@live@gt_contexts.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-rkl-11500t/igt@i915_selftest@live@gt_contexts.html

* igt@i915_selftest@live@gt_engines:
- {fi-tgl-dsi}: [PASS][75] -> [DMESG-WARN][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-tgl-dsi/igt@i915_selftest@live@gt_engines.html
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-tgl-dsi/igt@i915_selftest@live@gt_engines.html

* igt@i915_selftest@live@gt_timelines:
- {fi-tgl-dsi}: [PASS][77] -> [INCOMPLETE][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-tgl-dsi/igt@i915_selftest@live@gt_timelines.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-tgl-dsi/igt@i915_selftest@live@gt_timelines.html
- {fi-rkl-11500t}: [PASS][79] -> [DMESG-WARN][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-rkl-11500t/igt@i915_selftest@live@gt_timelines.html
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-rkl-11500t/igt@i915_selftest@live@gt_timelines.html
- {fi-ehl-1}: [PASS][81] -> [DMESG-WARN][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-ehl-1/igt@i915_selftest@live@gt_timelines.html
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-ehl-1/igt@i915_selftest@live@gt_timelines.html

* igt@runner@aborted:
- {fi-rkl-11500t}: NOTRUN -> [FAIL][83]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-rkl-11500t/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_19941 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@core_hotunplug@unbind-rebind:
- fi-kbl-7500u: [PASS][84] -> [DMESG-WARN][85] ([i915#2605])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-7500u/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-7500u/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-icl-y: NOTRUN -> [SKIP][86] ([i915#2190])
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@[email protected]

* igt@i915_selftest@live@execlists:
- fi-tgl-y: [PASS][87] -> [INCOMPLETE][88] ([i915#2268])
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-tgl-y/igt@i915_selftest@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-tgl-y/igt@i915_selftest@[email protected]
- fi-kbl-7567u: [PASS][89] -> [INCOMPLETE][90] ([i915#2782] / [i915#794])
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-7567u/igt@i915_selftest@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-7567u/igt@i915_selftest@[email protected]
- fi-kbl-soraka: [PASS][91] -> [INCOMPLETE][92] ([i915#2782] / [i915#794])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-soraka/igt@i915_selftest@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-soraka/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@gt_contexts:
- fi-kbl-guc: [PASS][93] -> [DMESG-FAIL][94] ([i915#2927])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-guc/igt@i915_selftest@live@gt_contexts.html
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-guc/igt@i915_selftest@live@gt_contexts.html
- fi-bsw-kefka: [PASS][95] -> [DMESG-FAIL][96] ([i915#2927])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-bsw-kefka/igt@i915_selftest@live@gt_contexts.html
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bsw-kefka/igt@i915_selftest@live@gt_contexts.html
- fi-kbl-r: [PASS][97] -> [DMESG-FAIL][98] ([i915#2927])
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-r/igt@i915_selftest@live@gt_contexts.html
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-r/igt@i915_selftest@live@gt_contexts.html
- fi-cfl-8109u: [PASS][99] -> [DMESG-FAIL][100] ([i915#2927])
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-cfl-8109u/igt@i915_selftest@live@gt_contexts.html
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cfl-8109u/igt@i915_selftest@live@gt_contexts.html

* igt@kms_chamelium@dp-crc-fast:
- fi-icl-y: NOTRUN -> [SKIP][101] ([fdo#109284] / [fdo#111827]) +8 similar issues
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-icl-y: NOTRUN -> [SKIP][102] ([fdo#109285])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-icl-y: NOTRUN -> [SKIP][103] ([fdo#109278])
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@[email protected]

* igt@kms_psr@primary_mmap_gtt:
- fi-icl-y: NOTRUN -> [SKIP][104] ([fdo#110189]) +3 similar issues
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@kms_psr@primary_mmap_gtt.html

* igt@prime_vgem@basic-userptr:
- fi-skl-6600u: NOTRUN -> [SKIP][105] ([fdo#109271])
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-6600u/igt@[email protected]
- fi-icl-y: NOTRUN -> [SKIP][106] ([i915#3301])
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@[email protected]

* igt@runner@aborted:
- fi-kbl-x1275: NOTRUN -> [FAIL][107] ([i915#2426])
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-x1275/igt@[email protected]
- fi-bsw-kefka: NOTRUN -> [FAIL][108] ([i915#1436])
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bsw-kefka/igt@[email protected]
- fi-cfl-8700k: NOTRUN -> [FAIL][109] ([i915#2426])
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cfl-8700k/igt@[email protected]
- fi-tgl-y: NOTRUN -> [FAIL][110] ([i915#1436] / [i915#2966])
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-tgl-y/igt@[email protected]
- fi-skl-6600u: NOTRUN -> [FAIL][111] ([i915#1436] / [i915#2426])
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-6600u/igt@[email protected]
- fi-cfl-8109u: NOTRUN -> [FAIL][112] ([i915#2426])
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cfl-8109u/igt@[email protected]
- fi-icl-u2: NOTRUN -> [FAIL][113] ([i915#2426] / [i915#2782])
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-u2/igt@[email protected]
- fi-glk-dsi: NOTRUN -> [FAIL][114] ([i915#2426] / [k.org#202321])
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-glk-dsi/igt@[email protected]
- fi-bsw-nick: NOTRUN -> [FAIL][115] ([i915#1436])
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bsw-nick/igt@[email protected]
- fi-snb-2520m: NOTRUN -> [FAIL][116] ([i915#2426])
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-snb-2520m/igt@[email protected]
- fi-kbl-r: NOTRUN -> [FAIL][117] ([i915#1436] / [i915#2426])
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-r/igt@[email protected]
- fi-kbl-soraka: NOTRUN -> [FAIL][118] ([i915#1436] / [i915#2426])
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-soraka/igt@[email protected]
- fi-hsw-4770: NOTRUN -> [FAIL][119] ([i915#2505])
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-hsw-4770/igt@[email protected]
- fi-kbl-7500u: NOTRUN -> [FAIL][120] ([i915#1436] / [i915#2426])
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-7500u/igt@[email protected]
- fi-kbl-guc: NOTRUN -> [FAIL][121] ([i915#1436] / [i915#2426])
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-guc/igt@[email protected]
- fi-cml-u2: NOTRUN -> [FAIL][122] ([i915#2082] / [i915#2426])
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cml-u2/igt@[email protected]
- fi-ivb-3770: NOTRUN -> [FAIL][123] ([i915#2426])
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-ivb-3770/igt@[email protected]
- fi-bxt-dsi: NOTRUN -> [FAIL][124] ([i915#2426])
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-bxt-dsi/igt@[email protected]
- fi-cml-s: NOTRUN -> [FAIL][125] ([i915#2082] / [i915#2426])
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cml-s/igt@[email protected]
- fi-cfl-guc: NOTRUN -> [FAIL][126] ([i915#2426])
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-cfl-guc/igt@[email protected]
- fi-icl-y: NOTRUN -> [FAIL][127] ([i915#2782])
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-icl-y/igt@[email protected]
- fi-kbl-7567u: NOTRUN -> [FAIL][128] ([i915#1436] / [i915#2426])
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-7567u/igt@[email protected]
- fi-skl-guc: NOTRUN -> [FAIL][129] ([i915#1186] / [i915#2426])
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-guc/igt@[email protected]
- fi-skl-6700k2: NOTRUN -> [FAIL][130] ([i915#2426])
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-6700k2/igt@[email protected]

#### Possible fixes ####

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-skl-6600u: [INCOMPLETE][131] ([i915#198]) -> [PASS][132]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-skl-6600u/igt@[email protected]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-skl-6600u/igt@[email protected]

#### Warnings ####

* igt@i915_pm_rpm@basic-rte:
- fi-kbl-guc: [SKIP][133] ([fdo#109271]) -> [FAIL][134] ([i915#579])
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-guc/igt@[email protected]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-guc/igt@[email protected]

* igt@runner@aborted:
- fi-kbl-8809g: [FAIL][135] ([i915#2947]) -> [FAIL][136] ([i915#1436] / [i915#2426])
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-kbl-8809g/igt@[email protected]
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-kbl-8809g/igt@[email protected]
- fi-apl-guc: [FAIL][137] ([i915#2426]) -> [FAIL][138] ([i915#2426] / [i915#3364] / [i915#337])
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9973/fi-apl-guc/igt@[email protected]
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/fi-apl-guc/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1186]: https://gitlab.freedesktop.org/drm/intel/issues/1186
[i915#1222]: https://gitlab.freedesktop.org/drm/intel/issues/1222
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#2082]: https://gitlab.freedesktop.org/drm/intel/issues/2082
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2268]: https://gitlab.freedesktop.org/drm/intel/issues/2268
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2505]: https://gitlab.freedesktop.org/drm/intel/issues/2505
[i915#2605]: https://gitlab.freedesktop.org/drm/intel/issues/2605
[i915#2782]: https://gitlab.freedesktop.org/drm/intel/issues/2782
[i915#2927]: https://gitlab.freedesktop.org/drm/intel/issues/2927
[i915#2932]: https://gitlab.freedesktop.org/drm/intel/issues/2932
[i915#2947]: https://gitlab.freedesktop.org/drm/intel/issues/2947
[i915#2966]: https://gitlab.freedesktop.org/drm/intel/issues/2966
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3364]: https://gitlab.freedesktop.org/drm/intel/issues/3364
[i915#337]: https://gitlab.freedesktop.org/drm/intel/issues/337
[i915#579]: https://gitlab.freedesktop.org/drm/intel/issues/579
[i915#794]: https://gitlab.freedesktop.org/drm/intel/issues/794
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321

Participating hosts (44 -> 42)
------------------------------

Additional (1): fi-icl-y
Missing (3): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_9973 -> Patchwork_19941

CI-20190529: 20190529
CI_DRM_9973: c543cf1cd8aa633c69d649a77c5419da7e715c8b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6066: 870601e7fb4aa8dcb118fd99833d07ce3dd2ea88 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19941: f15c470fe6c31ddbee34b7f908271f7a85ad95ad @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

f15c470fe6c3 drm/i915/gt: Fix a lockdep warning on RT kernel

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19941/index.html

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
In reply to Jun Miao

Hi,

Quoted 3 lines · Jun Miao

Don`t simple disable all the HD-irq, should race the region in the intel_breadcrumbs_disarm_irq() only.

What is HD-irq, I am, not familiar with that term?

Quoted 64 lines
BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:969
   #0: ffff89c4c00ca970 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1cf/0x6d0
   #1: ffffa433c1f53e60 ((work_completion)(&engine->retire_work)){+.+.}-{0:0}, at: process_one_work+0x1cf 0x6d
   #2: ffff89c4ccb0a0a8 (kernel_context){+.+.}-{0:0}, at: engine_retire+0x62/0x110 [i915]
   #3: ffff89c4cf682300 (wakeref.mutex#3){+.+.}-{0:0}, at: __intel_wakeref_put_last+0x20/0x60 [i915]
   #4: ffff89c4ccb08398 (&b->irq_lock){+.+.}-{0:0}, at: intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
  irq event stamp: 2126
  hardirqs last  enabled at (2125): [<ffffffffbb134739>] cancel_delayed_work+0xa9/0xc0
  hardirqs last disabled at (2126): [<ffffffffc0507fe6>] __intel_breadcrumbs_park+0x76/0x80 [i915]
  softirqs last  enabled at (0): [<ffffffffbb1099ce>] copy_process+0x63e/0x1630
  softirqs last disabled at (0): [<0000000000000000>] 0x0
  CPU: 3 PID: 281 Comm: kworker/3:3 Not tainted 5.10.27-rt34-yocto-preempt-rt #1
  Hardware name: Intel(R) Client Systems NUC7i5DNKE/NUC7i5DNB, BIOS DNKBLi5v.86A.0064.2019.0523.1933 05/23 2019
  Workqueue: events engine_retire [i915]
  Call Trace:
   show_stack+0x52/0x58
   dump_stack+0x7d/0x9f
   ___might_sleep.cold+0xe3/0xf4
   rt_spin_lock+0x3f/0xc0
   ? intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
   intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
   signal_irq_work+0x241/0x660 [i915]
   ? __this_cpu_preempt_check+0x13/0x20
   ? lockdep_hardirqs_off+0x106/0x120
   __intel_breadcrumbs_park+0x3f/0x80 [i915]
   __engine_park+0xbd/0xe0 [i915]
   ____intel_wakeref_put_last+0x22/0x60 [i915]
   __intel_wakeref_put_last+0x50/0x60 [i915]
   intel_context_exit_engine+0x5f/0x70 [i915]
   i915_request_retire+0x139/0x2d0 [i915]
   engine_retire+0xb0/0x110 [i915]
   process_one_work+0x26d/0x6d0
   worker_thread+0x53/0x330
   kthread+0x1b0/0x1d0
   ? process_one_work+0x6d0/0x6d0
   ? __kthread_parkme+0xc0/0xc0
   ret_from_fork+0x22/0x30
Fixes 9d5612ca165a ("drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission")
---
  drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +4 -2
index 34a645d..0589b1a 100644
@@ -103,10 +103,12 @@ static void __intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
 
  static void intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
  {
-	spin_lock(&b->irq_lock);
+	unsigned long flags;
+
+	spin_lock_irqsave(&b->irq_lock, flags);
  	if (b->irq_armed)
  		__intel_breadcrumbs_disarm_irq(b);
-	spin_unlock(&b->irq_lock);
+	spin_unlock_irqrestore(&b->irq_lock, flags);
  }
 
  static void add_signaling_context(struct intel_breadcrumbs *b,

drivers/gpu/drm/i915/gt/intel_breadcrumbs.c void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) · line 342

Quoted 6 lines
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +0 -2
@@ -337,9 +339,7 @@ void __intel_breadcrumbs_park(struct intel_breadcrumbs *b)
  	/* Kick the work once more to drain the signalers, and disarm the irq */
  	irq_work_sync(&b->irq_work);
  	while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) {
-		local_irq_disable();
  		signal_irq_work(&b->irq_work);
-		local_irq_enable();

Unfortunately there is another lock inside signal_irq_work (rq->lock) which needs to be taken irq safe.

RT patches are in tree or out of the tree these days?

Regards,

Tvrtko

drivers/gpu/drm/i915/gt/intel_breadcrumbs.c void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) · line 345

Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +0 -0
  		cond_resched();
  	}
  }

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#4 lore raw
Quoted 10 lines · Tvrtko Ursulin

[Please note: This e-mail is from an EXTERNAL e-mail address]

Hi,

Quoted 3 lines · Jun Miao

Don`t simple disable all the HD-irq, should race the region in the intel_breadcrumbs_disarm_irq() only.

What is HD-irq, I am, not familiar with that term?

Disable local interrupt delivery from Hardware of cpu.:-)

Thanks,

Jun

Quoted 64 lines
Quoted 64 lines
BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:969
   #0: ffff89c4c00ca970 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1cf/0x6d0
   #1: ffffa433c1f53e60 ((work_completion)(&engine->retire_work)){+.+.}-{0:0}, at: process_one_work+0x1cf 0x6d
   #2: ffff89c4ccb0a0a8 (kernel_context){+.+.}-{0:0}, at: engine_retire+0x62/0x110 [i915]
   #3: ffff89c4cf682300 (wakeref.mutex#3){+.+.}-{0:0}, at: __intel_wakeref_put_last+0x20/0x60 [i915]
   #4: ffff89c4ccb08398 (&b->irq_lock){+.+.}-{0:0}, at: intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
  irq event stamp: 2126
  hardirqs last  enabled at (2125): [<ffffffffbb134739>] cancel_delayed_work+0xa9/0xc0
  hardirqs last disabled at (2126): [<ffffffffc0507fe6>] __intel_breadcrumbs_park+0x76/0x80 [i915]
  softirqs last  enabled at (0): [<ffffffffbb1099ce>] copy_process+0x63e/0x1630
  softirqs last disabled at (0): [<0000000000000000>] 0x0
  CPU: 3 PID: 281 Comm: kworker/3:3 Not tainted 5.10.27-rt34-yocto-preempt-rt #1
  Hardware name: Intel(R) Client Systems NUC7i5DNKE/NUC7i5DNB, BIOS DNKBLi5v.86A.0064.2019.0523.1933 05/23 2019
  Workqueue: events engine_retire [i915]
  Call Trace:
   show_stack+0x52/0x58
   dump_stack+0x7d/0x9f
   ___might_sleep.cold+0xe3/0xf4
   rt_spin_lock+0x3f/0xc0
   ? intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
   intel_breadcrumbs_disarm_irq+0x20/0xd0 [i915]
   signal_irq_work+0x241/0x660 [i915]
   ? __this_cpu_preempt_check+0x13/0x20
   ? lockdep_hardirqs_off+0x106/0x120
   __intel_breadcrumbs_park+0x3f/0x80 [i915]
   __engine_park+0xbd/0xe0 [i915]
   ____intel_wakeref_put_last+0x22/0x60 [i915]
   __intel_wakeref_put_last+0x50/0x60 [i915]
   intel_context_exit_engine+0x5f/0x70 [i915]
   i915_request_retire+0x139/0x2d0 [i915]
   engine_retire+0xb0/0x110 [i915]
   process_one_work+0x26d/0x6d0
   worker_thread+0x53/0x330
   kthread+0x1b0/0x1d0
   ? process_one_work+0x6d0/0x6d0
   ? __kthread_parkme+0xc0/0xc0
   ret_from_fork+0x22/0x30
Fixes 9d5612ca165a ("drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission")

---
  drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 8 ++++----

  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +4 -2
index 34a645d..0589b1a 100644
@@ -103,10 +103,12 @@ static void 
 __intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
 
   static void intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
   {
-     spin_lock(&b->irq_lock);
+     unsigned long flags;
+
+     spin_lock_irqsave(&b->irq_lock, flags);
       if (b->irq_armed)
               __intel_breadcrumbs_disarm_irq(b);
-     spin_unlock(&b->irq_lock);
+     spin_unlock_irqrestore(&b->irq_lock, flags);
   }
 
Quoted 13 lines

drivers/gpu/drm/i915/gt/intel_breadcrumbs.c void __intel_breadcrumbs_park(struct · line 343

Quoted 9 lines

  static void add_signaling_context(struct intel_breadcrumbs *b,

drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +0 -2
@@ -337,9 +339,7 @@ void __intel_breadcrumbs_park(struct 
 intel_breadcrumbs *b)
       /* Kick the work once more to drain the signalers, and disarm the irq */
       irq_work_sync(&b->irq_work);
       while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) {
-             local_irq_disable();
               signal_irq_work(&b->irq_work);
-             local_irq_enable();

Unfortunately there is another lock inside signal_irq_work (rq->lock) which needs to be taken irq safe.

Ok, i will change the left spin_lock -> spin_lock_irqsave.

In fact,  inside signal_irq_work,  intel_breadcrumbs_arm_irq (&b->irq_lock)  which also needs to be taken irq safe.

Thanks,

Jun

Quoted 1 line

RT patches are in tree or out of the tree these days?

I base on the mainline kernel tree, and this BUG warning will not happen.  But RT v5.10 will complain "BUG warning", so i want this patch will solve RT WARNING without affecting mainline performance in mainline tree.

Thanks,

Jun

Quoted 9 lines

Regards,

Tvrtko

Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +0 -0
               cond_resched();
       }

  }

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw
Quoted 6 lines · jun.miao
Quoted 4 lines · Tvrtko Ursulin

[Please note: This e-mail is from an EXTERNAL e-mail address]

Hi,

Quoted 8 lines
Quoted 6 lines · Jun Miao
Quoted 3 lines

Don`t simple disable all the HD-irq, should race the region in the intel_breadcrumbs_disarm_irq() only.

What is HD-irq, I am, not familiar with that term?

Disable local interrupt delivery from Hardware of cpu.:-)

HW then, not HD. ;)

[...]

Quoted 17 lines
Quoted 4 lines
Quoted 4 lines

  static void add_signaling_context(struct intel_breadcrumbs *b,

(quoted diff) +0 -0
@@ -337,9 +339,7 @@ void __intel_breadcrumbs_park(struct 
 intel_breadcrumbs *b)
       /* Kick the work once more to drain the signalers, and disarm the irq */
Quoted 9 lines

drivers/gpu/drm/i915/gt/intel_breadcrumbs.c void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) · line 342

Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +0 -2
       irq_work_sync(&b->irq_work);
       while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) {
-             local_irq_disable();
               signal_irq_work(&b->irq_work);
-             local_irq_enable();

Unfortunately there is another lock inside signal_irq_work (rq->lock) which needs to be taken irq safe.

Ok, i will change the left spin_lock -> spin_lock_irqsave.

In fact,  inside signal_irq_work,  intel_breadcrumbs_arm_irq (&b->irq_lock)  which also needs to be taken irq safe.

Quoted 7 lines

Thanks,

Jun

Quoted 1 line

RT patches are in tree or out of the tree these days?

I base on the mainline kernel tree, and this BUG warning will not happen.  But RT v5.10 will complain "BUG warning", so i want this patch will solve RT WARNING without affecting mainline performance in mainline tree.

So the problem is we did not typically do changes to cater for out of tree stuff, unless they are really minimal. And this one in my view does not quite qualify as such.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx