This is a note to let you know that I've just added the patch titled drm/display/dp_mst: Fix payload addition on a disconnected sink to the 6.2-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-display-dp_mst-fix-payload-addition-on-a-disconnected-sink.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 33f960e23c29d113fe3193e0bdc19ac4f3776f20 Mon Sep 17 00:00:00 2001 From: Imre Deak <imre.deak@xxxxxxxxx> Date: Wed, 14 Dec 2022 20:42:58 +0200 Subject: drm/display/dp_mst: Fix payload addition on a disconnected sink From: Imre Deak <imre.deak@xxxxxxxxx> commit 33f960e23c29d113fe3193e0bdc19ac4f3776f20 upstream. If an MST stream is enabled on a disconnected sink, the payload for the stream is not created and the MST manager's payload count/next start VC slot is not updated. Since the payload's start VC slot may still contain a valid value (!= -1) the subsequent disabling of such a stream could cause an incorrect decrease of the payload count/next start VC slot in drm_dp_remove_payload() and hence later payload additions will fail. Fix the above by marking the payload as invalid in the above case, so that it's skipped during payload removal. While at it add a debug print for this case. Cc: Lyude Paul <lyude@xxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> # v6.1+ Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx> Reviewed-by: Lyude Paul <lyude@xxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-3-imre.deak@xxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c @@ -3309,8 +3309,13 @@ int drm_dp_add_payload_part1(struct drm_ int ret; port = drm_dp_mst_topology_get_port_validated(mgr, payload->port); - if (!port) + if (!port) { + drm_dbg_kms(mgr->dev, + "VCPI %d for port %p not in topology, not creating a payload\n", + payload->vcpi, payload->port); + payload->vc_start_slot = -1; return 0; + } if (mgr->payload_count == 0) mgr->next_start_slot = mst_state->start_slot; Patches currently in stable-queue which might be from imre.deak@xxxxxxxxx are queue-6.2/drm-i915-dp_mst-add-the-mst-topology-state-for-modesetted-crtcs.patch queue-6.2/drm-display-dp_mst-fix-down-message-handling-after-a-packet-reception-error.patch queue-6.2/drm-display-dp_mst-fix-down-up-message-handling-after-sink-disconnect.patch queue-6.2/drm-i915-fix-system-suspend-without-fbdev-being-initialized.patch queue-6.2/drm-display-dp_mst-fix-payload-addition-on-a-disconnected-sink.patch queue-6.2/drm-i915-dp_mst-fix-payload-removal-during-output-disabling.patch queue-6.2/drm-display-dp_mst-handle-old-new-payload-states-in-drm_dp_remove_payload.patch queue-6.2/drm-display-dp_mst-add-drm_atomic_get_old_mst_topology_state.patch