drm/dp: Read the tx msg state once after checking for an event
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 13 May 2017 10:52:00 +0000 (11:52 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 15 May 2017 11:59:50 +0000 (13:59 +0200)
commit992d38cc787d353aba8b0e13d37a719a3431db79
treed2f66e347918e98533f9a179dd910d549b936fb4
parentbebc1d55d2923ee365de394bcac8ed80ca558f42
drm/dp: Read the tx msg state once after checking for an event

Both as an exercise to document that we are reading the state outside of
the appropriate mutex and to ensure that we only read the value once
before the multiple comparisons, use READ_ONCE.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170513105201.17658-1-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_dp_mst_topology.c