twx-linux/drivers/gpu/drm/display
Imre Deak 12d8f31834 drm/dp_mst: Fix locking when skipping CSN before topology probing
The handling of the MST Connection Status Notify message is skipped if
the probing of the topology is still pending. Acquiring the
drm_dp_mst_topology_mgr::probe_lock for this in
drm_dp_mst_handle_up_req() is problematic: the task/work this function
is called from is also responsible for handling MST down-request replies
(in drm_dp_mst_handle_down_rep()). Thus drm_dp_mst_link_probe_work() -
holding already probe_lock - could be blocked waiting for an MST
down-request reply while drm_dp_mst_handle_up_req() is waiting for
probe_lock while processing a CSN message. This leads to the probe
work's down-request message timing out.

A scenario similar to the above leading to a down-request timeout is
handling a CSN message in drm_dp_mst_handle_conn_stat(), holding the
probe_lock and sending down-request messages while a second CSN message
sent by the sink subsequently is handled by drm_dp_mst_handle_up_req().

Fix the above by moving the logic to skip the CSN handling to
drm_dp_mst_process_up_req(). This function is called from a work
(separate from the task/work handling new up/down messages), already
holding probe_lock. This solves the above timeout issue, since handling
of down-request replies won't be blocked by probe_lock.

Fixes: ddf983488c3e ("drm/dp_mst: Skip CSN if topology probing is not done yet")
Cc: Wayne Lin <Wayne.Lin@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org # v6.6+
Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250307183152.3822170-1-imre.deak@intel.com
2025-03-11 11:29:18 +02:00
..
drm_bridge_connector.c Linux 6.13 2025-01-23 14:42:21 +01:00
drm_display_helper_mod.c
drm_dp_aux_bus.c drm: display: Set fwnode for aux bus devices 2024-11-05 14:03:27 +01:00
drm_dp_aux_dev.c
drm_dp_cec.c gpu: drm_dp_cec: fix broken CEC adapter properties check 2025-01-31 15:06:40 +02:00
drm_dp_dual_mode_helper.c drm/display: Fix building with GCC 15 2024-10-10 14:56:46 +03:00
drm_dp_helper_internal.h drm/display: Make DisplayPort AUX Chardev Kconfig name consistent 2024-03-28 11:26:46 +01:00
drm_dp_helper.c drm: Fix DSC BPP increment decoding 2025-02-13 10:20:30 +02:00
drm_dp_mst_topology_internal.h drm/dp_mst: avoid includes in drm_dp_mst_topology_internal.h 2024-03-11 11:47:06 +02:00
drm_dp_mst_topology.c drm/dp_mst: Fix locking when skipping CSN before topology probing 2025-03-11 11:29:18 +02:00
drm_dp_tunnel.c drm/display: use ERR_PTR on DP tunnel manager creation fail 2024-12-13 18:57:34 +02:00
drm_dsc_helper.c drm/display/dsc: Add a helper to dump the DSC configuration 2024-07-03 18:05:12 +03:00
drm_hdcp_helper.c drm/sysfs: rename drm_sysfs_connector_status_event() 2023-06-23 15:54:00 +02:00
drm_hdmi_audio_helper.c drm/connector: implement generic HDMI audio helpers 2025-01-04 08:47:11 +02:00
drm_hdmi_helper.c drm/display: hdmi: Add HDMI compute clock helper 2024-05-28 10:12:25 +02:00
drm_hdmi_state_helper.c drm/display: hdmi: Do not read EDID on disconnected connectors 2025-01-14 18:53:33 +01:00
drm_scdc_helper.c
Kconfig drm/display/hdmi: implement hotplug functions 2025-01-04 08:47:11 +02:00
Makefile drm/connector: implement generic HDMI audio helpers 2025-01-04 08:47:11 +02:00