Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe471395 authored by Sankeerth Billakanti's avatar Sankeerth Billakanti
Browse files

drm/msm/dp: check for invalid seqno before clearing a txmsg slot



Sometimes when the down reply and up request messages has to be
processed immediately, but the mst branch do not have enough tx
slots to transmit all the sideband ack messages, the driver fails
to allocate a slot for transmission and hence the sequence number
for the ack reply remains -1 or invalid. This is sometimes causing
a problem when the tx slot corresponding to the ack reply is
cleared without a proper sequence number check. These changes
ensure the sequence number is valid before clearing the tx slot.

Change-Id: I5a3655acd1f5045cedc75dfbd317867b3bc5cc8d
Signed-off-by: default avatarSankeerth Billakanti <sbillaka@codeaurora.org>
parent b679899e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -823,8 +823,9 @@ static int drm_dp_mst_wait_tx_reply(struct drm_dp_mst_branch *mstb,
			list_del(&txmsg->next);
		}

		if (txmsg->state == DRM_DP_SIDEBAND_TX_START_SEND ||
		    txmsg->state == DRM_DP_SIDEBAND_TX_SENT) {
		if ((txmsg->state == DRM_DP_SIDEBAND_TX_START_SEND ||
			txmsg->state == DRM_DP_SIDEBAND_TX_SENT) &&
			txmsg->seqno != -1) {
			mstb->tx_slots[txmsg->seqno] = NULL;
		}
	}
@@ -1638,6 +1639,7 @@ static void process_single_up_tx_qlock(struct drm_dp_mst_topology_mgr *mgr,
	if (ret != 1)
		DRM_DEBUG_KMS("failed to send msg in q %d\n", ret);

	if (txmsg->seqno != -1)
		txmsg->dst->tx_slots[txmsg->seqno] = NULL;
}