The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.19.y git checkout FETCH_HEAD git cherry-pick -x 1d082618bbf3b6755b8cc68c0a8122af2842d593 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '16784480185239@kroah.com' --subject-prefix 'PATCH 4.19.y' HEAD^..
Possible dependencies:
1d082618bbf3 ("drm/display/dp_mst: Fix down/up message handling after sink disconnect") da68386d9edb ("drm: Rename dp/ to display/") 6c64ae228f08 ("Backmerge tag 'v5.17-rc6' into drm-next")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 1d082618bbf3b6755b8cc68c0a8122af2842d593 Mon Sep 17 00:00:00 2001 From: Imre Deak imre.deak@intel.com Date: Wed, 14 Dec 2022 20:42:56 +0200 Subject: [PATCH] drm/display/dp_mst: Fix down/up message handling after sink disconnect
If the sink gets disconnected during receiving a multi-packet DP MST AUX down-reply/up-request sideband message, the state keeping track of which packets have been received already is not reset. This results in a failed sanity check for the subsequent message packet received after a sink is reconnected (due to the pending message not yet completed with an end-of-message-transfer packet), indicated by the
"sideband msg set header failed"
error.
Fix the above by resetting the up/down message reception state after a disconnect event.
Cc: Lyude Paul lyude@redhat.com Cc: stable@vger.kernel.org # v3.17+ Signed-off-by: Imre Deak imre.deak@intel.com Reviewed-by: Lyude Paul lyude@redhat.com Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-1-imre....
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c index 51a46689cda7..90819fff2c9b 100644 --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c @@ -3641,6 +3641,9 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, 0); ret = 0; mgr->payload_id_table_cleared = false; + + memset(&mgr->down_rep_recv, 0, sizeof(mgr->down_rep_recv)); + memset(&mgr->up_req_recv, 0, sizeof(mgr->up_req_recv)); }
out_unlock: