disp: msm: sde: add mutex lock to handle ppdone timeout usecases

The irq register and unregister calls in ppdone timeout
path can result in race condition which can lead to
scenarios where irqs will be enabled with no
callback registered. Add vblank mutex lock to avoid
such scenarios.

Change-Id: I02b07b773d6b9a28c3af431eb3d8314292769f12
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
This commit is contained in:
Krishna Manikandan
2020-11-18 12:44:27 +05:30
committed by Michael Bestas
parent e0ba35e805
commit 2e944be10e

View File

@ -525,12 +525,14 @@ static int _sde_encoder_phys_cmd_handle_ppdone_timeout(
pending_kickoff_cnt);
SDE_EVT32(DRMID(phys_enc->parent), SDE_EVTLOG_FATAL);
mutex_lock(phys_enc->vblank_ctl_lock);
sde_encoder_helper_unregister_irq(phys_enc, INTR_IDX_RDPTR);
if (sde_kms_is_secure_session_inprogress(phys_enc->sde_kms))
SDE_DBG_DUMP("secure", "all", "dbg_bus");
else
SDE_DBG_DUMP("all", "dbg_bus", "vbif_dbg_bus");
sde_encoder_helper_register_irq(phys_enc, INTR_IDX_RDPTR);
mutex_unlock(phys_enc->vblank_ctl_lock);
}
/*