aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_dp_mst_topology.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_dp_mst_topology.c')
-rw-r--r--drivers/gpu/drm/drm_dp_mst_topology.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index d1cbb9c8f806..3bdd314f02b1 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -737,16 +737,16 @@ static void drm_dp_mst_put_payload_id(struct drm_dp_mst_topology_mgr *mgr,
737static bool check_txmsg_state(struct drm_dp_mst_topology_mgr *mgr, 737static bool check_txmsg_state(struct drm_dp_mst_topology_mgr *mgr,
738 struct drm_dp_sideband_msg_tx *txmsg) 738 struct drm_dp_sideband_msg_tx *txmsg)
739{ 739{
740 bool ret; 740 unsigned int state;
741 741
742 /* 742 /*
743 * All updates to txmsg->state are protected by mgr->qlock, and the two 743 * All updates to txmsg->state are protected by mgr->qlock, and the two
744 * cases we check here are terminal states. For those the barriers 744 * cases we check here are terminal states. For those the barriers
745 * provided by the wake_up/wait_event pair are enough. 745 * provided by the wake_up/wait_event pair are enough.
746 */ 746 */
747 ret = (txmsg->state == DRM_DP_SIDEBAND_TX_RX || 747 state = READ_ONCE(txmsg->state);
748 txmsg->state == DRM_DP_SIDEBAND_TX_TIMEOUT); 748 return (state == DRM_DP_SIDEBAND_TX_RX ||
749 return ret; 749 state == DRM_DP_SIDEBAND_TX_TIMEOUT);
750} 750}
751 751
752static int drm_dp_mst_wait_tx_reply(struct drm_dp_mst_branch *mstb, 752static int drm_dp_mst_wait_tx_reply(struct drm_dp_mst_branch *mstb,