提交 68e989dc 编写于 作者: C Chris Wilson 提交者: Daniel Vetter

drm/dp: Wait up all outstanding tx waiters

As we can have multiple tx in the queue, with individual waiters, make
sure that all are woken when any state changes (so that we are sure the
right owner of the txmsg is woken).
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170513105201.17658-2-chris@chris-wilson.co.uk
上级 992d38cc
...@@ -855,7 +855,7 @@ static void drm_dp_destroy_mst_branch_device(struct kref *kref) ...@@ -855,7 +855,7 @@ static void drm_dp_destroy_mst_branch_device(struct kref *kref)
mutex_unlock(&mstb->mgr->qlock); mutex_unlock(&mstb->mgr->qlock);
if (wake_tx) if (wake_tx)
wake_up(&mstb->mgr->tx_waitq); wake_up_all(&mstb->mgr->tx_waitq);
kref_put(kref, drm_dp_free_mst_branch_device); kref_put(kref, drm_dp_free_mst_branch_device);
} }
...@@ -1510,7 +1510,7 @@ static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr) ...@@ -1510,7 +1510,7 @@ static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr)
if (txmsg->seqno != -1) if (txmsg->seqno != -1)
txmsg->dst->tx_slots[txmsg->seqno] = NULL; txmsg->dst->tx_slots[txmsg->seqno] = NULL;
txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT; txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT;
wake_up(&mgr->tx_waitq); wake_up_all(&mgr->tx_waitq);
} }
} }
...@@ -2258,7 +2258,7 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr) ...@@ -2258,7 +2258,7 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr)
mstb->tx_slots[slot] = NULL; mstb->tx_slots[slot] = NULL;
mutex_unlock(&mgr->qlock); mutex_unlock(&mgr->qlock);
wake_up(&mgr->tx_waitq); wake_up_all(&mgr->tx_waitq);
} }
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册