disp: msm: fix re-entry problem for msm_atomic_commit
When plane is detached from crtc in one atomic commit and then attached to another crtc in the next atomic commit, the second plane state swap will happen when the first commit is still running in the previous crtc's worker thread, which will result in two threads programming the same plane and run into undeterministic state. Fix is to add plane_mask check before state swap, together with crtc_mask check. This will make sure there is no pending worker thread working on the same plane. Change-Id: I64cd4b68fa9746e988d933069ac0f8083d974c79 Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org> Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This commit is contained in:

committed by
Samantha Tran

parent
ed6f9809d2
commit
8f99559493
@@ -631,6 +631,7 @@ struct msm_drm_private {
|
||||
|
||||
/* crtcs pending async atomic updates: */
|
||||
uint32_t pending_crtcs;
|
||||
uint32_t pending_planes;
|
||||
wait_queue_head_t pending_crtcs_event;
|
||||
|
||||
unsigned int num_planes;
|
||||
|
Reference in New Issue
Block a user