Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/dp_mst: Remove single tx msg restriction.

Now that we can support multiple simultaneous replies, remove the
restrictions placed on sending new tx msgs.

This patch essentially just reverts commit
5a64967a2f3b ("drm/dp_mst: Have DP_Tx send one msg at a time")
now that the problem is solved in a different way.

Cc: Wayne Lin <Wayne.Lin@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Wayne Lin <waynelin@amd.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200213211523.156998-4-sean@poorly.run

+2 -17
+2 -12
drivers/gpu/drm/drm_dp_mst_topology.c
··· 1205 1205 txmsg->state == DRM_DP_SIDEBAND_TX_SENT) { 1206 1206 mstb->tx_slots[txmsg->seqno] = NULL; 1207 1207 } 1208 - mgr->is_waiting_for_dwn_reply = false; 1209 - 1210 1208 } 1211 1209 out: 1212 1210 if (unlikely(ret == -EIO) && drm_debug_enabled(DRM_UT_DP)) { ··· 1214 1216 } 1215 1217 mutex_unlock(&mgr->qlock); 1216 1218 1217 - drm_dp_mst_kick_tx(mgr); 1218 1219 return ret; 1219 1220 } 1220 1221 ··· 2793 2796 ret = process_single_tx_qlock(mgr, txmsg, false); 2794 2797 if (ret == 1) { 2795 2798 /* txmsg is sent it should be in the slots now */ 2796 - mgr->is_waiting_for_dwn_reply = true; 2797 2799 list_del(&txmsg->next); 2798 2800 } else if (ret) { 2799 2801 DRM_DEBUG_KMS("failed to send msg in q %d\n", ret); 2800 - mgr->is_waiting_for_dwn_reply = false; 2801 2802 list_del(&txmsg->next); 2802 2803 if (txmsg->seqno != -1) 2803 2804 txmsg->dst->tx_slots[txmsg->seqno] = NULL; ··· 2835 2840 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); 2836 2841 } 2837 2842 2838 - if (list_is_singular(&mgr->tx_msg_downq) && 2839 - !mgr->is_waiting_for_dwn_reply) 2843 + if (list_is_singular(&mgr->tx_msg_downq)) 2840 2844 process_single_down_tx_qlock(mgr); 2841 2845 mutex_unlock(&mgr->qlock); 2842 2846 } ··· 3822 3828 mutex_lock(&mgr->qlock); 3823 3829 txmsg->state = DRM_DP_SIDEBAND_TX_RX; 3824 3830 mstb->tx_slots[seqno] = NULL; 3825 - mgr->is_waiting_for_dwn_reply = false; 3826 3831 mutex_unlock(&mgr->qlock); 3827 3832 3828 3833 wake_up_all(&mgr->tx_waitq); ··· 3829 3836 return 0; 3830 3837 3831 3838 out_clear_reply: 3832 - mutex_lock(&mgr->qlock); 3833 - mgr->is_waiting_for_dwn_reply = false; 3834 - mutex_unlock(&mgr->qlock); 3835 3839 if (msg) 3836 3840 memset(msg, 0, sizeof(struct drm_dp_sideband_msg_rx)); 3837 3841 out: ··· 4686 4696 struct drm_dp_mst_topology_mgr *mgr = container_of(work, struct drm_dp_mst_topology_mgr, tx_work); 4687 4697 4688 4698 mutex_lock(&mgr->qlock); 4689 - if (!list_empty(&mgr->tx_msg_downq) && !mgr->is_waiting_for_dwn_reply) 4699 + if (!list_empty(&mgr->tx_msg_downq)) 4690 4700 process_single_down_tx_qlock(mgr); 4691 4701 mutex_unlock(&mgr->qlock); 4692 4702 }
-5
include/drm/drm_dp_mst_helper.h
··· 591 591 bool payload_id_table_cleared : 1; 592 592 593 593 /** 594 - * @is_waiting_for_dwn_reply: whether we're waiting for a down reply. 595 - */ 596 - bool is_waiting_for_dwn_reply : 1; 597 - 598 - /** 599 594 * @mst_primary: Pointer to the primary/first branch device. 600 595 */ 601 596 struct drm_dp_mst_branch *mst_primary;