* [PATCH] drm/i915: Cancel the hotplug work when unregistering the connector @ 2017-10-06 15:59 Chris Wilson 2017-10-06 16:49 ` ✗ Fi.CI.BAT: warning for " Patchwork ` (4 more replies) 0 siblings, 5 replies; 11+ messages in thread From: Chris Wilson @ 2017-10-06 15:59 UTC (permalink / raw) To: intel-gfx; +Cc: Tony Cheng, Daniel Vetter, Harry Wentland When we unregister the connector, we may have a pending hotplug work. This needs to be cancel early during the teardown so that it does not fire after we have freed the connector. Or else we may see something like: DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock)) ------------[ cut here ]------------ WARNING: CPU: 4 PID: 5010 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x4e/0x60 Modules linked in: i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem ax88179_178a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e ptp pps_core prime_numbers i2c_hid [last unloaded: snd_hda_intel] CPU: 4 PID: 5010 Comm: drv_module_relo Tainted: G U 4.14.0-rc3-CI-CI_DRM_3186+ #1 Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWX1.R00.X104.A03.1709140524 09/14/2017 task: ffff8803c827aa40 task.stack: ffffc90000520000 RIP: 0010:mutex_destroy+0x4e/0x60 RSP: 0018:ffffc90000523d58 EFLAGS: 00010292 RAX: 000000000000002a RBX: ffff88044fbef648 RCX: 0000000000000000 RDX: 0000000080000001 RSI: 0000000000000001 RDI: ffffffff810f0cf0 RBP: ffffc90000523d60 R08: 0000000000000001 R09: 0000000000000001 R10: 000000000f21cb81 R11: 0000000000000000 R12: ffff88044f71efc8 R13: ffffffffa02b3d20 R14: ffffffffa02b3d90 R15: ffff880459b29308 FS: 00007f5df4d6e8c0(0000) GS:ffff88045d300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055ec51f00a18 CR3: 0000000451782006 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: drm_fb_helper_fini+0xd9/0x130 intel_fbdev_destroy+0x12/0x60 [i915] intel_fbdev_fini+0x28/0x30 [i915] intel_modeset_cleanup+0x45/0xa0 [i915] i915_driver_unload+0x92/0x180 [i915] i915_pci_remove+0x19/0x30 [i915] pci_device_remove+0x39/0xb0 device_release_driver_internal+0x15d/0x220 driver_detach+0x40/0x80 bus_remove_driver+0x58/0xd0 driver_unregister+0x2c/0x40 pci_unregister_driver+0x36/0xb0 i915_exit+0x1a/0x8b [i915] SyS_delete_module+0x18c/0x1e0 entry_SYSCALL_64_fastpath+0x1c/0xb1 RIP: 0033:0x7f5df3286287 RSP: 002b:00007fff8e107cc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: ffffffff81493a03 RCX: 00007f5df3286287 RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000564c7be02e48 RBP: ffffc90000523f88 R08: 0000000000000000 R09: 0000000000000080 R10: 00007f5df4d6e8c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff8e107eb0 R14: 0000000000000000 R15: 0000000000000000 ? __this_cpu_preempt_check+0x13/0x20 Code: 00 00 5b 5d c3 e8 93 b9 3a 00 85 c0 74 ec 8b 05 e1 53 c3 01 85 c0 75 e2 48 c7 c6 86 a6 c7 81 48 c7 c7 8b 8d c6 81 e8 03 ae 01 00 <0f> ff eb cb 0f 1f 40 00 66 2e 0f 1f 84 00 00 00 00 00 55 48 b8 ---[ end trace 08901ff1a77d30c6 ]--- [drm:wait_panel_status [i915]] mask b800000f value 00000000 status 00000000 control 00000060 [drm:wait_panel_status [i915]] Wait complete [drm:edp_panel_vdd_on [i915]] PP_STATUS: 0x00000000 PP_CONTROL: 0x00000068 [drm:edp_panel_vdd_on [i915]] eDP port A panel power wasn't enabled [drm:drm_dp_read_desc] DP sink: OUI 00-1c-f8 dev-ID HW-rev 0.0 SW-rev 7.49 quirks 0x0000 [drm:drm_edid_to_eld] ELD: no CEA Extension found [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:48:eDP-1] probed modes : [drm:drm_mode_debug_printmodeline] Modeline 49:"1920x1080" 60 138780 1920 1966 1996 2080 1080 1082 1086 1112 0x48 0xa [drm:drm_mode_debug_printmodeline] Modeline 50:"1920x1080" 40 92520 1920 1966 1996 2080 1080 1082 1086 1112 0x40 0xa general protection fault: 0000 [#1] PREEMPT SMP Modules linked in: i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem ax88179_178a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e ptp pps_core prime_numbers i2c_hid [last unloaded: snd_hda_intel] CPU: 0 PID: 82 Comm: kworker/0:1 Tainted: G U W 4.14.0-rc3-CI-CI_DRM_3186+ #1 Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWX1.R00.X104.A03.1709140524 09/14/2017 Workqueue: events intel_dp_modeset_retry_work_fn [i915] task: ffff88045a5caa40 task.stack: ffffc90000378000 RIP: 0010:drm_setup_crtcs+0x143/0xbf0 RSP: 0018:ffffc9000037bd20 EFLAGS: 00010202 RAX: 6b6b6b6b6b6b6b6b RBX: 0000000000000002 RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000780 RDI: 00000000ffffffff RBP: ffffc9000037bdb8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000780 R11: 0000000000000000 R12: 0000000000000002 R13: ffff88044fbef4e8 R14: 0000000000000780 R15: 0000000000000438 FS: 0000000000000000(0000) GS:ffff88045d200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055ec51ee5168 CR3: 000000044c89d003 CR4: 00000000003606f0 Call Trace: drm_fb_helper_hotplug_event.part.18+0x7e/0xc0 drm_fb_helper_hotplug_event+0x1a/0x20 intel_fbdev_output_poll_changed+0x1a/0x20 [i915] drm_kms_helper_hotplug_event+0x27/0x30 intel_dp_modeset_retry_work_fn+0x77/0x80 [i915] process_one_work+0x233/0x660 worker_thread+0x206/0x3b0 kthread+0x152/0x190 ? process_one_work+0x660/0x660 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x27/0x40 Code: 06 00 00 45 8b 45 20 31 db 45 31 e4 45 85 c0 0f 8e 91 06 00 00 44 8b 75 94 44 8b 7d 90 49 8b 45 28 49 63 d4 44 89 f6 41 83 c4 01 <48> 8b 04 d0 44 89 fa 48 8b 38 48 8b 87 a8 01 00 00 ff 50 20 01 RIP: drm_setup_crtcs+0x143/0xbf0 RSP: ffffc9000037bd20 ---[ end trace 08901ff1a77d30c7 ]--- Suggested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Fixes: 9301397a63b3 ("drm/i915: Implement Link Rate fallback on Link training failure") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tony Cheng <tony.cheng@amd.com> Cc: Harry Wentland <Harry.wentland@amd.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- drivers/gpu/drm/i915/intel_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9f2bf3b3f759..f14c45b9f55d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -15238,6 +15238,8 @@ void intel_connector_unregister(struct drm_connector *connector) { struct intel_connector *intel_connector = to_intel_connector(connector); + cancel_work_sync(&intel_connector->modeset_retry_work); + intel_backlight_device_unregister(intel_connector); intel_panel_destroy_backlight(connector); } -- 2.14.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* ✗ Fi.CI.BAT: warning for drm/i915: Cancel the hotplug work when unregistering the connector 2017-10-06 15:59 [PATCH] drm/i915: Cancel the hotplug work when unregistering the connector Chris Wilson @ 2017-10-06 16:49 ` Patchwork 2017-10-06 17:18 ` [PATCH v2] " Chris Wilson ` (3 subsequent siblings) 4 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2017-10-06 16:49 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915: Cancel the hotplug work when unregistering the connector URL : https://patchwork.freedesktop.org/series/31501/ State : warning == Summary == Series 31501v1 drm/i915: Cancel the hotplug work when unregistering the connector https://patchwork.freedesktop.org/api/1.0/series/31501/revisions/1/mbox/ Test drv_module_reload: Subgroup basic-reload: pass -> DMESG-WARN (fi-blb-e6850) pass -> DMESG-WARN (fi-pnv-d510) pass -> DMESG-WARN (fi-bwr-2160) pass -> DMESG-WARN (fi-elk-e7500) pass -> DMESG-WARN (fi-snb-2520m) pass -> DMESG-WARN (fi-snb-2600) pass -> DMESG-WARN (fi-ivb-3520m) pass -> DMESG-WARN (fi-ivb-3770) pass -> DMESG-WARN (fi-byt-j1900) pass -> DMESG-WARN (fi-hsw-4770) pass -> DMESG-WARN (fi-hsw-4770r) pass -> DMESG-WARN (fi-bdw-5557u) pass -> DMESG-WARN (fi-bdw-gvtdvm) pass -> DMESG-WARN (fi-bsw-n3050) pass -> DMESG-WARN (fi-skl-6260u) pass -> DMESG-WARN (fi-skl-6700k) pass -> DMESG-WARN (fi-skl-6770hq) pass -> DMESG-WARN (fi-skl-gvtdvm) pass -> DMESG-WARN (fi-bxt-dsi) pass -> DMESG-WARN (fi-bxt-j4205) pass -> DMESG-WARN (fi-kbl-7500u) pass -> DMESG-WARN (fi-kbl-7560u) pass -> DMESG-WARN (fi-kbl-r) pass -> DMESG-WARN (fi-glk-1) pass -> DMESG-WARN (fi-cfl-s) pass -> DMESG-WARN (fi-cnl-y) Subgroup basic-no-display: pass -> DMESG-WARN (fi-cfl-s) fdo#103022 +1 fdo#103022 https://bugs.freedesktop.org/show_bug.cgi?id=103022 fi-bdw-5557u total:289 pass:267 dwarn:1 dfail:0 fail:0 skip:21 time:462s fi-bdw-gvtdvm total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:480s fi-blb-e6850 total:289 pass:222 dwarn:2 dfail:0 fail:0 skip:65 time:403s fi-bsw-n3050 total:289 pass:242 dwarn:1 dfail:0 fail:0 skip:46 time:566s fi-bwr-2160 total:289 pass:182 dwarn:1 dfail:0 fail:0 skip:106 time:286s fi-bxt-dsi total:289 pass:258 dwarn:1 dfail:0 fail:0 skip:30 time:524s fi-bxt-j4205 total:289 pass:259 dwarn:1 dfail:0 fail:0 skip:29 time:531s fi-byt-j1900 total:289 pass:252 dwarn:2 dfail:0 fail:0 skip:35 time:539s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:579s fi-cnl-y total:289 pass:261 dwarn:1 dfail:0 fail:0 skip:27 time:649s fi-elk-e7500 total:289 pass:228 dwarn:1 dfail:0 fail:0 skip:60 time:435s fi-glk-1 total:289 pass:260 dwarn:1 dfail:0 fail:0 skip:28 time:597s fi-hsw-4770 total:289 pass:261 dwarn:1 dfail:0 fail:0 skip:27 time:438s fi-hsw-4770r total:289 pass:261 dwarn:1 dfail:0 fail:0 skip:27 time:419s fi-ivb-3520m total:289 pass:259 dwarn:1 dfail:0 fail:0 skip:29 time:503s fi-ivb-3770 total:289 pass:259 dwarn:1 dfail:0 fail:0 skip:29 time:475s fi-kbl-7500u total:289 pass:263 dwarn:2 dfail:0 fail:0 skip:24 time:506s fi-kbl-7560u total:289 pass:269 dwarn:1 dfail:0 fail:0 skip:19 time:583s fi-kbl-7567u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:488s fi-kbl-r total:289 pass:261 dwarn:1 dfail:0 fail:0 skip:27 time:591s fi-pnv-d510 total:289 pass:221 dwarn:2 dfail:0 fail:0 skip:66 time:667s fi-skl-6260u total:289 pass:268 dwarn:1 dfail:0 fail:0 skip:20 time:467s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:656s fi-skl-6700k total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:570s fi-skl-6770hq total:289 pass:268 dwarn:1 dfail:0 fail:0 skip:20 time:509s fi-skl-gvtdvm total:289 pass:265 dwarn:1 dfail:0 fail:0 skip:23 time:471s fi-snb-2520m total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:581s fi-snb-2600 total:289 pass:248 dwarn:1 dfail:0 fail:0 skip:40 time:433s fi-byt-n2820 failed to connect after reboot cb32cc2ad1c3ccd0803276d5af46c410f5104951 drm-tip: 2017y-10m-06d-15h-01m-44s UTC integration manifest 9af48be91aae drm/i915: Cancel the hotplug work when unregistering the connector == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5936/ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2] drm/i915: Cancel the hotplug work when unregistering the connector 2017-10-06 15:59 [PATCH] drm/i915: Cancel the hotplug work when unregistering the connector Chris Wilson 2017-10-06 16:49 ` ✗ Fi.CI.BAT: warning for " Patchwork @ 2017-10-06 17:18 ` Chris Wilson 2017-10-09 9:41 ` Maarten Lankhorst 2017-10-06 18:06 ` ✓ Fi.CI.BAT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) Patchwork ` (2 subsequent siblings) 4 siblings, 1 reply; 11+ messages in thread From: Chris Wilson @ 2017-10-06 17:18 UTC (permalink / raw) To: intel-gfx; +Cc: Tony Cheng, Daniel Vetter, Harry Wentland When we unregister the connector, we may have a pending hotplug work. This needs to be cancel early during the teardown so that it does not fire after we have freed the connector. Or else we may see something like: DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock)) ------------[ cut here ]------------ WARNING: CPU: 4 PID: 5010 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x4e/0x60 Modules linked in: i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem ax88179_178a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e ptp pps_core prime_numbers i2c_hid [last unloaded: snd_hda_intel] CPU: 4 PID: 5010 Comm: drv_module_relo Tainted: G U 4.14.0-rc3-CI-CI_DRM_3186+ #1 Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWX1.R00.X104.A03.1709140524 09/14/2017 task: ffff8803c827aa40 task.stack: ffffc90000520000 RIP: 0010:mutex_destroy+0x4e/0x60 RSP: 0018:ffffc90000523d58 EFLAGS: 00010292 RAX: 000000000000002a RBX: ffff88044fbef648 RCX: 0000000000000000 RDX: 0000000080000001 RSI: 0000000000000001 RDI: ffffffff810f0cf0 RBP: ffffc90000523d60 R08: 0000000000000001 R09: 0000000000000001 R10: 000000000f21cb81 R11: 0000000000000000 R12: ffff88044f71efc8 R13: ffffffffa02b3d20 R14: ffffffffa02b3d90 R15: ffff880459b29308 FS: 00007f5df4d6e8c0(0000) GS:ffff88045d300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055ec51f00a18 CR3: 0000000451782006 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: drm_fb_helper_fini+0xd9/0x130 intel_fbdev_destroy+0x12/0x60 [i915] intel_fbdev_fini+0x28/0x30 [i915] intel_modeset_cleanup+0x45/0xa0 [i915] i915_driver_unload+0x92/0x180 [i915] i915_pci_remove+0x19/0x30 [i915] pci_device_remove+0x39/0xb0 device_release_driver_internal+0x15d/0x220 driver_detach+0x40/0x80 bus_remove_driver+0x58/0xd0 driver_unregister+0x2c/0x40 pci_unregister_driver+0x36/0xb0 i915_exit+0x1a/0x8b [i915] SyS_delete_module+0x18c/0x1e0 entry_SYSCALL_64_fastpath+0x1c/0xb1 RIP: 0033:0x7f5df3286287 RSP: 002b:00007fff8e107cc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: ffffffff81493a03 RCX: 00007f5df3286287 RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000564c7be02e48 RBP: ffffc90000523f88 R08: 0000000000000000 R09: 0000000000000080 R10: 00007f5df4d6e8c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff8e107eb0 R14: 0000000000000000 R15: 0000000000000000 ? __this_cpu_preempt_check+0x13/0x20 Code: 00 00 5b 5d c3 e8 93 b9 3a 00 85 c0 74 ec 8b 05 e1 53 c3 01 85 c0 75 e2 48 c7 c6 86 a6 c7 81 48 c7 c7 8b 8d c6 81 e8 03 ae 01 00 <0f> ff eb cb 0f 1f 40 00 66 2e 0f 1f 84 00 00 00 00 00 55 48 b8 ---[ end trace 08901ff1a77d30c6 ]--- [drm:wait_panel_status [i915]] mask b800000f value 00000000 status 00000000 control 00000060 [drm:wait_panel_status [i915]] Wait complete [drm:edp_panel_vdd_on [i915]] PP_STATUS: 0x00000000 PP_CONTROL: 0x00000068 [drm:edp_panel_vdd_on [i915]] eDP port A panel power wasn't enabled [drm:drm_dp_read_desc] DP sink: OUI 00-1c-f8 dev-ID HW-rev 0.0 SW-rev 7.49 quirks 0x0000 [drm:drm_edid_to_eld] ELD: no CEA Extension found [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:48:eDP-1] probed modes : [drm:drm_mode_debug_printmodeline] Modeline 49:"1920x1080" 60 138780 1920 1966 1996 2080 1080 1082 1086 1112 0x48 0xa [drm:drm_mode_debug_printmodeline] Modeline 50:"1920x1080" 40 92520 1920 1966 1996 2080 1080 1082 1086 1112 0x40 0xa general protection fault: 0000 [#1] PREEMPT SMP Modules linked in: i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem ax88179_178a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e ptp pps_core prime_numbers i2c_hid [last unloaded: snd_hda_intel] CPU: 0 PID: 82 Comm: kworker/0:1 Tainted: G U W 4.14.0-rc3-CI-CI_DRM_3186+ #1 Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWX1.R00.X104.A03.1709140524 09/14/2017 Workqueue: events intel_dp_modeset_retry_work_fn [i915] task: ffff88045a5caa40 task.stack: ffffc90000378000 RIP: 0010:drm_setup_crtcs+0x143/0xbf0 RSP: 0018:ffffc9000037bd20 EFLAGS: 00010202 RAX: 6b6b6b6b6b6b6b6b RBX: 0000000000000002 RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000780 RDI: 00000000ffffffff RBP: ffffc9000037bdb8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000780 R11: 0000000000000000 R12: 0000000000000002 R13: ffff88044fbef4e8 R14: 0000000000000780 R15: 0000000000000438 FS: 0000000000000000(0000) GS:ffff88045d200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055ec51ee5168 CR3: 000000044c89d003 CR4: 00000000003606f0 Call Trace: drm_fb_helper_hotplug_event.part.18+0x7e/0xc0 drm_fb_helper_hotplug_event+0x1a/0x20 intel_fbdev_output_poll_changed+0x1a/0x20 [i915] drm_kms_helper_hotplug_event+0x27/0x30 intel_dp_modeset_retry_work_fn+0x77/0x80 [i915] process_one_work+0x233/0x660 worker_thread+0x206/0x3b0 kthread+0x152/0x190 ? process_one_work+0x660/0x660 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x27/0x40 Code: 06 00 00 45 8b 45 20 31 db 45 31 e4 45 85 c0 0f 8e 91 06 00 00 44 8b 75 94 44 8b 7d 90 49 8b 45 28 49 63 d4 44 89 f6 41 83 c4 01 <48> 8b 04 d0 44 89 fa 48 8b 38 48 8b 87 a8 01 00 00 ff 50 20 01 RIP: drm_setup_crtcs+0x143/0xbf0 RSP: ffffc9000037bd20 ---[ end trace 08901ff1a77d30c7 ]--- v2: Only cancel if the work has been initialised. Suggested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Fixes: 9301397a63b3 ("drm/i915: Implement Link Rate fallback on Link training failure") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tony Cheng <tony.cheng@amd.com> Cc: Harry Wentland <Harry.wentland@amd.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- I'm not sure if this cancellation is early enough in the sequence, considering it's called modeset_retry_work I presume we should perhaps be doing this inside an intel_modeset function. --- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9f2bf3b3f759..32c46444aa69 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -15238,6 +15238,9 @@ void intel_connector_unregister(struct drm_connector *connector) { struct intel_connector *intel_connector = to_intel_connector(connector); + if (intel_connector->modeset_retry_work.func) + cancel_work_sync(&intel_connector->modeset_retry_work); + intel_backlight_device_unregister(intel_connector); intel_panel_destroy_backlight(connector); } -- 2.14.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2] drm/i915: Cancel the hotplug work when unregistering the connector 2017-10-06 17:18 ` [PATCH v2] " Chris Wilson @ 2017-10-09 9:41 ` Maarten Lankhorst 2017-10-09 9:59 ` Chris Wilson 0 siblings, 1 reply; 11+ messages in thread From: Maarten Lankhorst @ 2017-10-09 9:41 UTC (permalink / raw) To: Chris Wilson, intel-gfx; +Cc: Tony Cheng, Daniel Vetter, Harry Wentland Op 06-10-17 om 19:18 schreef Chris Wilson: > When we unregister the connector, we may have a pending hotplug work. > This needs to be cancel early during the teardown so that it does not > fire after we have freed the connector. Or else we may see something like: Well the nice thing is even if it's called modeset_retry_work, it just sets the link status to bad for DP. I worry it might be too early, wouldn't intel_dp_connector_destroy be a better place? At that point we know userspace can no longer use it, because the last reference has been removed. ~Maarten _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] drm/i915: Cancel the hotplug work when unregistering the connector 2017-10-09 9:41 ` Maarten Lankhorst @ 2017-10-09 9:59 ` Chris Wilson 2017-10-09 10:33 ` Maarten Lankhorst 0 siblings, 1 reply; 11+ messages in thread From: Chris Wilson @ 2017-10-09 9:59 UTC (permalink / raw) To: Maarten Lankhorst, intel-gfx; +Cc: Tony Cheng, Daniel Vetter, Harry Wentland Quoting Maarten Lankhorst (2017-10-09 10:41:29) > Op 06-10-17 om 19:18 schreef Chris Wilson: > > When we unregister the connector, we may have a pending hotplug work. > > This needs to be cancel early during the teardown so that it does not > > fire after we have freed the connector. Or else we may see something like: > Well the nice thing is even if it's called modeset_retry_work, it just sets the link status to bad for DP. Ok, and sends a hotplug event. At what point in the shutdown sequence does that drm_kms_helper_hotplug_event() become invalid? > I worry it might be too early, wouldn't intel_dp_connector_destroy be a better place? At that point we know userspace can no longer use it, > because the last reference has been removed. connector_destroy is after drm_kms_helper_poll_fini(), so that seems suspect given a query about drm_kms_helper_hotplug_event() A hook from drm_atomic_helper_shutdown? Extending unregister to have a late phase? -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] drm/i915: Cancel the hotplug work when unregistering the connector 2017-10-09 9:59 ` Chris Wilson @ 2017-10-09 10:33 ` Maarten Lankhorst 2017-10-25 16:52 ` Chris Wilson 0 siblings, 1 reply; 11+ messages in thread From: Maarten Lankhorst @ 2017-10-09 10:33 UTC (permalink / raw) To: Chris Wilson, intel-gfx; +Cc: Tony Cheng, Daniel Vetter, Harry Wentland Op 09-10-17 om 11:59 schreef Chris Wilson: > Quoting Maarten Lankhorst (2017-10-09 10:41:29) >> Op 06-10-17 om 19:18 schreef Chris Wilson: >>> When we unregister the connector, we may have a pending hotplug work. >>> This needs to be cancel early during the teardown so that it does not >>> fire after we have freed the connector. Or else we may see something like: >> Well the nice thing is even if it's called modeset_retry_work, it just sets the link status to bad for DP. > Ok, and sends a hotplug event. At what point in the shutdown sequence > does that drm_kms_helper_hotplug_event() become invalid? Some digging makes me suspect at the very end of driver unload. So for this either is fine. But after some more digging, it's not enough, see below. >> I worry it might be too early, wouldn't intel_dp_connector_destroy be a better place? At that point we know userspace can no longer use it, >> because the last reference has been removed. > connector_destroy is after drm_kms_helper_poll_fini(), so that seems > suspect given a query about drm_kms_helper_hotplug_event() > > A hook from drm_atomic_helper_shutdown? Extending unregister to have a > late phase? > Well after some more digging the only case where early_unregister vs unregister matters is DP-MST, where we can lose connectors dynamically. As long as we never use modeset_retry_work on DP-MST connectors, everything is fine. Fortunately we don't do that, only used in DP connectors for now. But if you look at the backtrace, the first error is from intel_fbdev_fini, so we need to cancel the work after poll_fini, and before fbdev_fini. Fixing it in early_unregister is simply too late.. ~Maarten _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] drm/i915: Cancel the hotplug work when unregistering the connector 2017-10-09 10:33 ` Maarten Lankhorst @ 2017-10-25 16:52 ` Chris Wilson 2017-10-25 19:23 ` Manasi Navare 0 siblings, 1 reply; 11+ messages in thread From: Chris Wilson @ 2017-10-25 16:52 UTC (permalink / raw) To: Maarten Lankhorst, intel-gfx; +Cc: Tony Cheng, Daniel Vetter, Harry Wentland Quoting Maarten Lankhorst (2017-10-09 11:33:21) > Op 09-10-17 om 11:59 schreef Chris Wilson: > > Quoting Maarten Lankhorst (2017-10-09 10:41:29) > >> Op 06-10-17 om 19:18 schreef Chris Wilson: > >>> When we unregister the connector, we may have a pending hotplug work. > >>> This needs to be cancel early during the teardown so that it does not > >>> fire after we have freed the connector. Or else we may see something like: > >> Well the nice thing is even if it's called modeset_retry_work, it just sets the link status to bad for DP. > > Ok, and sends a hotplug event. At what point in the shutdown sequence > > does that drm_kms_helper_hotplug_event() become invalid? > Some digging makes me suspect at the very end of driver unload. So for this either is fine. But after some more digging, it's not enough, see below. > >> I worry it might be too early, wouldn't intel_dp_connector_destroy be a better place? At that point we know userspace can no longer use it, > >> because the last reference has been removed. > > connector_destroy is after drm_kms_helper_poll_fini(), so that seems > > suspect given a query about drm_kms_helper_hotplug_event() > > > > A hook from drm_atomic_helper_shutdown? Extending unregister to have a > > late phase? > > > Well after some more digging the only case where early_unregister vs unregister matters is DP-MST, where we can lose connectors dynamically. > As long as we never use modeset_retry_work on DP-MST connectors, everything is fine. Fortunately we don't do that, only used in DP connectors for now. > > But if you look at the backtrace, the first error is from intel_fbdev_fini, so we need to cancel the work after poll_fini, and before fbdev_fini. > > Fixing it in early_unregister is simply too late.. early_unregister is before fbdev_fini. You may mean that it's too early? Anyway, shall we just revert commit 9301397a63b3bf1090dffe846c6f1c8efa032236 Author: Manasi Navare <manasi.d.navare@intel.com> Date: Thu Apr 6 16:44:19 2017 +0300 drm/i915: Implement Link Rate fallback on Link training failure as the authors seem not to care about the kernel oopses? -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] drm/i915: Cancel the hotplug work when unregistering the connector 2017-10-25 16:52 ` Chris Wilson @ 2017-10-25 19:23 ` Manasi Navare 0 siblings, 0 replies; 11+ messages in thread From: Manasi Navare @ 2017-10-25 19:23 UTC (permalink / raw) To: Chris Wilson; +Cc: Harry Wentland, intel-gfx, Daniel Vetter, Tony Cheng On Wed, Oct 25, 2017 at 05:52:35PM +0100, Chris Wilson wrote: > Quoting Maarten Lankhorst (2017-10-09 11:33:21) > > Op 09-10-17 om 11:59 schreef Chris Wilson: > > > Quoting Maarten Lankhorst (2017-10-09 10:41:29) > > >> Op 06-10-17 om 19:18 schreef Chris Wilson: > > >>> When we unregister the connector, we may have a pending hotplug work. > > >>> This needs to be cancel early during the teardown so that it does not > > >>> fire after we have freed the connector. Or else we may see something like: > > >> Well the nice thing is even if it's called modeset_retry_work, it just sets the link status to bad for DP. > > > Ok, and sends a hotplug event. At what point in the shutdown sequence > > > does that drm_kms_helper_hotplug_event() become invalid? > > Some digging makes me suspect at the very end of driver unload. So for this either is fine. But after some more digging, it's not enough, see below. > > >> I worry it might be too early, wouldn't intel_dp_connector_destroy be a better place? At that point we know userspace can no longer use it, > > >> because the last reference has been removed. > > > connector_destroy is after drm_kms_helper_poll_fini(), so that seems > > > suspect given a query about drm_kms_helper_hotplug_event() > > > > > > A hook from drm_atomic_helper_shutdown? Extending unregister to have a > > > late phase? > > > > > Well after some more digging the only case where early_unregister vs unregister matters is DP-MST, where we can lose connectors dynamically. > > As long as we never use modeset_retry_work on DP-MST connectors, everything is fine. Fortunately we don't do that, only used in DP connectors for now. > > This function actually would also get called for MST connectors since it gets scheduled anytime intel_dp_start_link_train() fails and that can happen even for DP MST connectors. This work function will get scheduled after the existing modeset is completed. So if the driver is unloaded before that, then why dont we cancel this work first thing in the intel_modeset_cleanup()? Now the question what if it was already scheduled and it has sent the hotplug event, how can we make sure the hotplu event is killed? > > But if you look at the backtrace, the first error is from intel_fbdev_fini, so we need to cancel the work after poll_fini, and before fbdev_fini. > > > > Fixing it in early_unregister is simply too late.. > > early_unregister is before fbdev_fini. You may mean that it's too early? > > Anyway, shall we just revert I dont think reverting this patch is gonna help since its gonna start introducing random black screens as a result of unaddressed link failures that this patch attempts on fixing. > > commit 9301397a63b3bf1090dffe846c6f1c8efa032236 > Author: Manasi Navare <manasi.d.navare@intel.com> > Date: Thu Apr 6 16:44:19 2017 +0300 > > drm/i915: Implement Link Rate fallback on Link training failure > > as the authors seem not to care about the kernel oopses? > -Chris On it to find a proper place for adding this cancel work call to fix the kernel oopses. Thanks for catching this. Manasi _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) 2017-10-06 15:59 [PATCH] drm/i915: Cancel the hotplug work when unregistering the connector Chris Wilson 2017-10-06 16:49 ` ✗ Fi.CI.BAT: warning for " Patchwork 2017-10-06 17:18 ` [PATCH v2] " Chris Wilson @ 2017-10-06 18:06 ` Patchwork 2017-10-06 23:13 ` ✗ Fi.CI.IGT: warning for drm/i915: Cancel the hotplug work when unregistering the connector Patchwork 2017-10-07 2:40 ` ✓ Fi.CI.IGT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) Patchwork 4 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2017-10-06 18:06 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915: Cancel the hotplug work when unregistering the connector (rev2) URL : https://patchwork.freedesktop.org/series/31501/ State : success == Summary == Series 31501v2 drm/i915: Cancel the hotplug work when unregistering the connector https://patchwork.freedesktop.org/api/1.0/series/31501/revisions/2/mbox/ Test kms_pipe_crc_basic: Subgroup suspend-read-crc-pipe-b: pass -> DMESG-WARN (fi-byt-j1900) fdo#101705 fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705 fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:452s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:476s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:395s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:561s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:288s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:524s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:530s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:543s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:530s fi-cfl-s total:289 pass:256 dwarn:1 dfail:0 fail:0 skip:32 time:560s fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:623s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:444s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:599s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:438s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:419s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:505s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:475s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:502s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:580s fi-kbl-7567u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:495s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:599s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:469s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:661s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:530s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:525s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:473s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:580s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:431s fi-pnv-d510 failed to connect after reboot aaf31e875e72b50f6a970c11f797b7f5b61a2681 drm-tip: 2017y-10m-06d-17h-24m-22s UTC integration manifest e16fa7a43e0a drm/i915: Cancel the hotplug work when unregistering the connector == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5937/ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* ✗ Fi.CI.IGT: warning for drm/i915: Cancel the hotplug work when unregistering the connector 2017-10-06 15:59 [PATCH] drm/i915: Cancel the hotplug work when unregistering the connector Chris Wilson ` (2 preceding siblings ...) 2017-10-06 18:06 ` ✓ Fi.CI.BAT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) Patchwork @ 2017-10-06 23:13 ` Patchwork 2017-10-07 2:40 ` ✓ Fi.CI.IGT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) Patchwork 4 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2017-10-06 23:13 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915: Cancel the hotplug work when unregistering the connector URL : https://patchwork.freedesktop.org/series/31501/ State : warning == Summary == Test drv_module_reload: Subgroup basic-reload-inject: pass -> DMESG-WARN (shard-hsw) fdo#102707 +2 Test gem_eio: Subgroup wait: dmesg-warn -> PASS (shard-hsw) fdo#102886 Test kms_cursor_legacy: Subgroup basic-flip-before-cursor-atomic: pass -> SKIP (shard-hsw) Test kms_frontbuffer_tracking: Subgroup fbc-1p-primscrn-shrfb-plflip-blt: pass -> SKIP (shard-hsw) Test kms_rotation_crc: Subgroup sprite-rotation-180: pass -> SKIP (shard-hsw) Test pm_rpm: Subgroup gem-mmap-cpu: pass -> SKIP (shard-hsw) Test kms_draw_crc: Subgroup draw-method-xrgb8888-render-xtiled: pass -> SKIP (shard-hsw) Test kms_chv_cursor_fail: Subgroup pipe-A-64x64-left-edge: pass -> SKIP (shard-hsw) Test kms_setmode: Subgroup basic: fail -> PASS (shard-hsw) fdo#99912 Test kms_atomic_transition: Subgroup plane-all-modeset-transition: pass -> DMESG-WARN (shard-hsw) fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707 fdo#102886 https://bugs.freedesktop.org/show_bug.cgi?id=102886 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 shard-hsw total:2446 pass:1320 dwarn:9 dfail:0 fail:8 skip:1109 time:10039s == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5936/shards.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) 2017-10-06 15:59 [PATCH] drm/i915: Cancel the hotplug work when unregistering the connector Chris Wilson ` (3 preceding siblings ...) 2017-10-06 23:13 ` ✗ Fi.CI.IGT: warning for drm/i915: Cancel the hotplug work when unregistering the connector Patchwork @ 2017-10-07 2:40 ` Patchwork 4 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2017-10-07 2:40 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915: Cancel the hotplug work when unregistering the connector (rev2) URL : https://patchwork.freedesktop.org/series/31501/ State : success == Summary == Test kms_cursor_legacy: Subgroup cursorA-vs-flipA-atomic-transitions: fail -> PASS (shard-hsw) fdo#102723 fdo#102723 https://bugs.freedesktop.org/show_bug.cgi?id=102723 shard-hsw total:2446 pass:1329 dwarn:6 dfail:0 fail:8 skip:1103 time:10131s == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5937/shards.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-10-25 19:18 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-10-06 15:59 [PATCH] drm/i915: Cancel the hotplug work when unregistering the connector Chris Wilson 2017-10-06 16:49 ` ✗ Fi.CI.BAT: warning for " Patchwork 2017-10-06 17:18 ` [PATCH v2] " Chris Wilson 2017-10-09 9:41 ` Maarten Lankhorst 2017-10-09 9:59 ` Chris Wilson 2017-10-09 10:33 ` Maarten Lankhorst 2017-10-25 16:52 ` Chris Wilson 2017-10-25 19:23 ` Manasi Navare 2017-10-06 18:06 ` ✓ Fi.CI.BAT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) Patchwork 2017-10-06 23:13 ` ✗ Fi.CI.IGT: warning for drm/i915: Cancel the hotplug work when unregistering the connector Patchwork 2017-10-07 2:40 ` ✓ Fi.CI.IGT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) Patchwork
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.