Explorar o código

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 <[email protected]>
Krishna Manikandan %!s(int64=4) %!d(string=hai) anos
pai
achega
8576a93988
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      msm/sde/sde_encoder_phys_cmd.c

+ 2 - 0
msm/sde/sde_encoder_phys_cmd.c

@@ -541,12 +541,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);
 	}
 
 	/*