From b75954bba61fa7f45ee57e27eac4ba562ce4c112 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 10 Mar 2023 12:41:30 +0100 Subject: [PATCH] 5.10-stable patches added patches: drm-display-dp_mst-fix-down-message-handling-after-a-packet-reception-error.patch drm-display-dp_mst-fix-down-up-message-handling-after-sink-disconnect.patch --- ...dling-after-a-packet-reception-error.patch | 38 ++++++++++++++++ ...ssage-handling-after-sink-disconnect.patch | 45 +++++++++++++++++++ queue-5.10/series | 2 + 3 files changed, 85 insertions(+) create mode 100644 queue-5.10/drm-display-dp_mst-fix-down-message-handling-after-a-packet-reception-error.patch create mode 100644 queue-5.10/drm-display-dp_mst-fix-down-up-message-handling-after-sink-disconnect.patch diff --git a/queue-5.10/drm-display-dp_mst-fix-down-message-handling-after-a-packet-reception-error.patch b/queue-5.10/drm-display-dp_mst-fix-down-message-handling-after-a-packet-reception-error.patch new file mode 100644 index 00000000000..bec9dba6aaa --- /dev/null +++ b/queue-5.10/drm-display-dp_mst-fix-down-message-handling-after-a-packet-reception-error.patch @@ -0,0 +1,38 @@ +From 1241aedb6b5c7a5a8ad73e5eb3a41cfe18a3e00e Mon Sep 17 00:00:00 2001 +From: Imre Deak +Date: Wed, 14 Dec 2022 20:42:57 +0200 +Subject: drm/display/dp_mst: Fix down message handling after a packet reception error + +From: Imre Deak + +commit 1241aedb6b5c7a5a8ad73e5eb3a41cfe18a3e00e upstream. + +After an error during receiving a packet for a multi-packet DP MST +sideband message, the state tracking which packets have been received +already is not reset. This prevents the reception of subsequent down +messages (due to the pending message not yet completed with an +end-of-message-transfer packet). + +Fix the above by resetting the reception state after a packet error. + +Cc: Lyude Paul +Cc: # v3.17+ +Signed-off-by: Imre Deak +Reviewed-by: Lyude Paul +Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-2-imre.deak@intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/drm_dp_mst_topology.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/drm_dp_mst_topology.c ++++ b/drivers/gpu/drm/drm_dp_mst_topology.c +@@ -3988,7 +3988,7 @@ static int drm_dp_mst_handle_down_rep(st + struct drm_dp_sideband_msg_rx *msg = &mgr->down_rep_recv; + + if (!drm_dp_get_one_sb_msg(mgr, false, &mstb)) +- goto out; ++ goto out_clear_reply; + + /* Multi-packet message transmission, don't clear the reply */ + if (!msg->have_eomt) diff --git a/queue-5.10/drm-display-dp_mst-fix-down-up-message-handling-after-sink-disconnect.patch b/queue-5.10/drm-display-dp_mst-fix-down-up-message-handling-after-sink-disconnect.patch new file mode 100644 index 00000000000..b6d56b25585 --- /dev/null +++ b/queue-5.10/drm-display-dp_mst-fix-down-up-message-handling-after-sink-disconnect.patch @@ -0,0 +1,45 @@ +From 1d082618bbf3b6755b8cc68c0a8122af2842d593 Mon Sep 17 00:00:00 2001 +From: Imre Deak +Date: Wed, 14 Dec 2022 20:42:56 +0200 +Subject: drm/display/dp_mst: Fix down/up message handling after sink disconnect + +From: Imre Deak + +commit 1d082618bbf3b6755b8cc68c0a8122af2842d593 upstream. + +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 +Cc: # v3.17+ +Signed-off-by: Imre Deak +Reviewed-by: Lyude Paul +Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-1-imre.deak@intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/drm_dp_mst_topology.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/gpu/drm/drm_dp_mst_topology.c ++++ b/drivers/gpu/drm/drm_dp_mst_topology.c +@@ -3769,6 +3769,9 @@ int drm_dp_mst_topology_mgr_set_mst(stru + set_bit(0, &mgr->payload_mask); + mgr->vcpi_mask = 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: diff --git a/queue-5.10/series b/queue-5.10/series index 360d094b9ae..67c184f3884 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -513,3 +513,5 @@ soundwire-cadence-drain-the-rx-fifo-after-an-io-time.patch net-tls-avoid-hanging-tasks-on-the-tx_lock.patch x86-resctrl-apply-read_once-write_once-to-task_struct.-rmid-closid.patch x86-resctl-fix-scheduler-confusion-with-current.patch +drm-display-dp_mst-fix-down-up-message-handling-after-sink-disconnect.patch +drm-display-dp_mst-fix-down-message-handling-after-a-packet-reception-error.patch -- 2.47.3