提交 cb021a3e 编写于 作者: D Daniel Vetter

drm/dp-mst: Remove tx_down_in_progress

Just replicates whether the list is empty or not. Nuke code
to avoid writing docs for it!

Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1468612088-9721-6-git-send-email-daniel.vetter@ffwll.ch
上级 212ae891
...@@ -1493,11 +1493,8 @@ static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr) ...@@ -1493,11 +1493,8 @@ static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr)
WARN_ON(!mutex_is_locked(&mgr->qlock)); WARN_ON(!mutex_is_locked(&mgr->qlock));
/* construct a chunk from the first msg in the tx_msg queue */ /* construct a chunk from the first msg in the tx_msg queue */
if (list_empty(&mgr->tx_msg_downq)) { if (list_empty(&mgr->tx_msg_downq))
mgr->tx_down_in_progress = false;
return; return;
}
mgr->tx_down_in_progress = true;
txmsg = list_first_entry(&mgr->tx_msg_downq, struct drm_dp_sideband_msg_tx, next); txmsg = list_first_entry(&mgr->tx_msg_downq, struct drm_dp_sideband_msg_tx, next);
ret = process_single_tx_qlock(mgr, txmsg, false); ret = process_single_tx_qlock(mgr, txmsg, false);
...@@ -1512,10 +1509,6 @@ static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr) ...@@ -1512,10 +1509,6 @@ static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr)
txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT; txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT;
wake_up(&mgr->tx_waitq); wake_up(&mgr->tx_waitq);
} }
if (list_empty(&mgr->tx_msg_downq)) {
mgr->tx_down_in_progress = false;
return;
}
} }
/* called holding qlock */ /* called holding qlock */
...@@ -1538,7 +1531,7 @@ static void drm_dp_queue_down_tx(struct drm_dp_mst_topology_mgr *mgr, ...@@ -1538,7 +1531,7 @@ static void drm_dp_queue_down_tx(struct drm_dp_mst_topology_mgr *mgr,
{ {
mutex_lock(&mgr->qlock); mutex_lock(&mgr->qlock);
list_add_tail(&txmsg->next, &mgr->tx_msg_downq); list_add_tail(&txmsg->next, &mgr->tx_msg_downq);
if (!mgr->tx_down_in_progress) if (list_is_singular(&mgr->tx_msg_downq))
process_single_down_tx_qlock(mgr); process_single_down_tx_qlock(mgr);
mutex_unlock(&mgr->qlock); mutex_unlock(&mgr->qlock);
} }
...@@ -2887,7 +2880,7 @@ static void drm_dp_tx_work(struct work_struct *work) ...@@ -2887,7 +2880,7 @@ static void drm_dp_tx_work(struct work_struct *work)
struct drm_dp_mst_topology_mgr *mgr = container_of(work, struct drm_dp_mst_topology_mgr, tx_work); struct drm_dp_mst_topology_mgr *mgr = container_of(work, struct drm_dp_mst_topology_mgr, tx_work);
mutex_lock(&mgr->qlock); mutex_lock(&mgr->qlock);
if (mgr->tx_down_in_progress) if (!list_empty(&mgr->tx_msg_downq))
process_single_down_tx_qlock(mgr); process_single_down_tx_qlock(mgr);
mutex_unlock(&mgr->qlock); mutex_unlock(&mgr->qlock);
} }
......
...@@ -446,7 +446,6 @@ struct drm_dp_mst_topology_mgr { ...@@ -446,7 +446,6 @@ struct drm_dp_mst_topology_mgr {
the mstb tx_slots and txmsg->state once they are queued */ the mstb tx_slots and txmsg->state once they are queued */
struct mutex qlock; struct mutex qlock;
struct list_head tx_msg_downq; struct list_head tx_msg_downq;
bool tx_down_in_progress;
/* payload info + lock for it */ /* payload info + lock for it */
struct mutex payload_lock; struct mutex payload_lock;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册