drm/mst: fix recursive sleep warning on qlock
With drm-next, we can get a backtrace from sleeping with mutex detection. this is due to the callback checking the txmsg state taking the mutex, which can cause a sleep inside a sleep, Daniel went over it and was happy we could drop this mutex in this case. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
9a6f513014
commit
cd961bb9ee
@ -733,10 +733,14 @@ static bool check_txmsg_state(struct drm_dp_mst_topology_mgr *mgr,
|
|||||||
struct drm_dp_sideband_msg_tx *txmsg)
|
struct drm_dp_sideband_msg_tx *txmsg)
|
||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
mutex_lock(&mgr->qlock);
|
|
||||||
|
/*
|
||||||
|
* All updates to txmsg->state are protected by mgr->qlock, and the two
|
||||||
|
* cases we check here are terminal states. For those the barriers
|
||||||
|
* provided by the wake_up/wait_event pair are enough.
|
||||||
|
*/
|
||||||
ret = (txmsg->state == DRM_DP_SIDEBAND_TX_RX ||
|
ret = (txmsg->state == DRM_DP_SIDEBAND_TX_RX ||
|
||||||
txmsg->state == DRM_DP_SIDEBAND_TX_TIMEOUT);
|
txmsg->state == DRM_DP_SIDEBAND_TX_TIMEOUT);
|
||||||
mutex_unlock(&mgr->qlock);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1363,12 +1367,13 @@ static int process_single_tx_qlock(struct drm_dp_mst_topology_mgr *mgr,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* must be called holding qlock */
|
|
||||||
static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr)
|
static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr)
|
||||||
{
|
{
|
||||||
struct drm_dp_sideband_msg_tx *txmsg;
|
struct drm_dp_sideband_msg_tx *txmsg;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
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;
|
mgr->tx_down_in_progress = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user