Skip to content

Commit 6bb0942

Browse files
committed
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 5a64967 ("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
1 parent fbc821c commit 6bb0942

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

‎drivers/gpu/drm/drm_dp_mst_topology.c‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,8 +1205,6 @@ static int drm_dp_mst_wait_tx_reply(struct drm_dp_mst_branch *mstb,
12051205
txmsg->state == DRM_DP_SIDEBAND_TX_SENT) {
12061206
mstb->tx_slots[txmsg->seqno] = NULL;
12071207
}
1208-
mgr->is_waiting_for_dwn_reply = false;
1209-
12101208
}
12111209
out:
12121210
if (unlikely(ret == -EIO) && drm_debug_enabled(DRM_UT_DP)) {
@@ -1216,7 +1214,6 @@ static int drm_dp_mst_wait_tx_reply(struct drm_dp_mst_branch *mstb,
12161214
}
12171215
mutex_unlock(&mgr->qlock);
12181216

1219-
drm_dp_mst_kick_tx(mgr);
12201217
return ret;
12211218
}
12221219

@@ -2796,11 +2793,9 @@ static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr)
27962793
ret = process_single_tx_qlock(mgr, txmsg, false);
27972794
if (ret == 1) {
27982795
/* txmsg is sent it should be in the slots now */
2799-
mgr->is_waiting_for_dwn_reply = true;
28002796
list_del(&txmsg->next);
28012797
} else if (ret) {
28022798
DRM_DEBUG_KMS("failed to send msg in q %d\n", ret);
2803-
mgr->is_waiting_for_dwn_reply = false;
28042799
list_del(&txmsg->next);
28052800
if (txmsg->seqno != -1)
28062801
txmsg->dst->tx_slots[txmsg->seqno] = NULL;
@@ -2840,8 +2835,7 @@ static void drm_dp_queue_down_tx(struct drm_dp_mst_topology_mgr *mgr,
28402835
drm_dp_mst_dump_sideband_msg_tx(&p, txmsg);
28412836
}
28422837

2843-
if (list_is_singular(&mgr->tx_msg_downq) &&
2844-
!mgr->is_waiting_for_dwn_reply)
2838+
if (list_is_singular(&mgr->tx_msg_downq))
28452839
process_single_down_tx_qlock(mgr);
28462840
mutex_unlock(&mgr->qlock);
28472841
}
@@ -3828,17 +3822,13 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr)
38283822
mutex_lock(&mgr->qlock);
38293823
txmsg->state = DRM_DP_SIDEBAND_TX_RX;
38303824
mstb->tx_slots[seqno] = NULL;
3831-
mgr->is_waiting_for_dwn_reply = false;
38323825
mutex_unlock(&mgr->qlock);
38333826

38343827
wake_up_all(&mgr->tx_waitq);
38353828

38363829
return 0;
38373830

38383831
out_clear_reply:
3839-
mutex_lock(&mgr->qlock);
3840-
mgr->is_waiting_for_dwn_reply = false;
3841-
mutex_unlock(&mgr->qlock);
38423832
if (msg)
38433833
memset(msg, 0, sizeof(struct drm_dp_sideband_msg_rx));
38443834
out:
@@ -4696,7 +4686,7 @@ static void drm_dp_tx_work(struct work_struct *work)
46964686
struct drm_dp_mst_topology_mgr *mgr = container_of(work, struct drm_dp_mst_topology_mgr, tx_work);
46974687

46984688
mutex_lock(&mgr->qlock);
4699-
if (!list_empty(&mgr->tx_msg_downq) && !mgr->is_waiting_for_dwn_reply)
4689+
if (!list_empty(&mgr->tx_msg_downq))
47004690
process_single_down_tx_qlock(mgr);
47014691
mutex_unlock(&mgr->qlock);
47024692
}

‎include/drm/drm_dp_mst_helper.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,6 @@ struct drm_dp_mst_topology_mgr {
590590
*/
591591
bool payload_id_table_cleared : 1;
592592

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-
598593
/**
599594
* @mst_primary: Pointer to the primary/first branch device.
600595
*/

0 commit comments

Comments
 (0)