On Tue, 29 Sep 2026 04:54:29 +0000, [email protected] wrote: > Does this introduce an AB-BA deadlock between mode_config.mutex and > plugged_lock?
Yes, I hit it on the Lenovo Y700 Gen 5 (TB323FU, Kaanapali) when booting with an MST monitor on the USB-C port (Linux v7.3 with Dmitry's "drm: handle IRQ_HPD events correctly" v8 [1] and this series). The lock order is the same in v7 as posted; nothing in my tree changes it. The HPD worker holds plugged_lock and waits for mode_config.mutex (msm_dp_display_mst_enable() is inlined into msm_dp_display_process_hpd_high()), and the compositor's GETCONNECTOR holds mode_config.mutex and waits for plugged_lock: INFO: task kworker/0:0:9 is blocked on a mutex likely owned by task <compositor>:2439. INFO: task <compositor>:2439 is blocked on a mutex likely owned by task kworker/0:0:9. Workqueue: events_freezable pmic_glink_altmode_worker mutex_lock+0x30/0x70 msm_dp_display_process_hpd_high+0x23c/0x2c8 msm_dp_hpd_plug_handle+0xf4/0x208 msm_dp_bridge_hpd_notify+0x118/0x290 drm_bridge_connector_hpd_notify+0x7c/0xf0 drm_bridge_connector_handle_hpd+0x5c/0xc0 drm_bridge_connector_hpd_cb+0x1c/0x30 drm_bridge_hpd_notify_extra+0x4c/0x70 drm_aux_hpd_bridge_notify_extra+0x4c/0x70 pmic_glink_altmode_worker+0x274/0x520 <compositor>: mutex_lock+0x30/0x70 msm_dp_bridge_detect+0x54/0x338 drm_bridge_connector_detect+0x40/0xc8 drm_helper_probe_single_connector_modes+0x158/0x608 drm_mode_getconnector+0x19c/0x448 32/35 is there to avoid a transient connected -> disconnected change seen by polling. With 25/35, drm_bridge_connector_handle_hpd() stores the result of detect() in connector->status right after hpd_notify() returns, and detect() returns disconnected once mst_active is set (29/35), so I wonder whether the write is still needed. If it is, it could be done without holding plugged_lock. To get past the deadlock I dropped 32/35 locally. Since then, booting with the monitor attached has not hung (4 boots), and over 3 plugs of the monitor with drm.debug=0x4 the SST connector never showed a status change in the probe helper; it stays disconnected while MST is active. [1] https://lore.kernel.org/all/[email protected]/ Thanks, Joonhoe Kim
