linux/drivers/gpu/drm/display
Luca Coelho 6130598759 drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()
A hotplug or link-loss event can tear down the MST topology
(setting mgr->mst_state = false and mgr->mst_primary = NULL) concurrently
with a caller invoking drm_dp_mst_topology_queue_probe(). Since the check
is already performed under mgr->lock, the condition is not a programming
error but a valid race -- the topology was valid when the caller decided
to call this function, but was torn down before the lock was acquired.

Replace the drm_WARN_ON() with a graceful early return. This eliminates
spurious kernel warnings and the resulting compositor crashes observed
when connecting/disconnecting DP MST monitors, while keeping the correct
behavior of doing nothing when MST is not active. A drm_dbg_mst() trace
is added so the skipped probe remains observable under MST debug logging.

The existing WARN_ON(mgr->mst_primary) in drm_dp_mst_topology_mgr_set_mst()
already catches the case where the topology is initialized twice, so no
diagnostic coverage is lost.

Fixes: dbaeef363e ("drm/dp_mst: Add a helper to queue a topology probe")
Cc: Imre Deak <imre.deak@intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Jonas Emilsson <jonas.emilsson@gmail.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/all/20260503034533.1023686-1-jonas.emilsson@gmail.com
Acked-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260622140532.526722-1-luciano.coelho@intel.com
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
2026-07-01 12:07:10 +02:00
..
drm_bridge_connector.c Merge drm/drm-next into drm-misc-next 2026-05-07 16:17:01 +02:00
drm_display_helper_mod.c
drm_dp_aux_bus.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_dp_aux_dev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_dp_cec.c gpu: drm: display: drm_dp_cec: update Hans' email address 2025-09-09 15:59:07 +02:00
drm_dp_dual_mode_helper.c
drm_dp_helper_internal.h
drm_dp_helper.c drm/dp: Add DSC virtual DPCD quirk for Realtek MST branch device 2026-05-27 16:36:58 +03:00
drm_dp_mst_topology_internal.h
drm_dp_mst_topology.c drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe() 2026-07-01 12:07:10 +02:00
drm_dp_tunnel.c - Enable PIPEDMC_ERROR interrupt (Dibin) 2026-05-06 10:55:14 +10:00
drm_dsc_helper.c
drm_hdcp_helper.c
drm_hdmi_audio_helper.c
drm_hdmi_cec_helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_hdmi_cec_notifier_helper.c
drm_hdmi_helper.c drm/display: hdmi: Use drm_output_color_format instead of hdmi_colorspace 2026-03-24 13:54:35 +01:00
drm_hdmi_state_helper.c drm: Rename struct drm_atomic_state to drm_atomic_commit 2026-05-04 14:05:04 +10:00
drm_scdc_helper.c
Kconfig
Makefile