Browse Source

disp: msm: sde: avoid rc restart when triggered from panel dead

This change prevents scheduling of rc_restart in case of
panel dead. This early return is required to avoid the list
add corruption when a race condition happens between event
thread and commit thread. When event thread is handling
display failure notification if the virt_enable arrives in
commit thread it will reinizialize kthread for
delayed_off_work without deactivating the existing list
which leads to linkage corruption.

Change-Id: I41d08cd47ba6f887f0860e52bcddf414085524bb
Signed-off-by: Mahadevan <[email protected]>
Mahadevan 4 years ago
parent
commit
bc86c9a0cc
1 changed files with 4 additions and 0 deletions
  1. 4 0
      msm/sde/sde_encoder.c

+ 4 - 0
msm/sde/sde_encoder.c

@@ -1704,6 +1704,10 @@ static void _sde_encoder_rc_restart_delayed(struct sde_encoder_virt *sde_enc,
 	unsigned int lp, idle_pc_duration;
 	unsigned int lp, idle_pc_duration;
 	struct msm_drm_thread *disp_thread;
 	struct msm_drm_thread *disp_thread;
 
 
+	/* return early if called from esd thread */
+	if (!sde_enc->delay_kickoff)
+		return;
+
 	/* set idle timeout based on master connector's lp value */
 	/* set idle timeout based on master connector's lp value */
 	if (sde_enc->cur_master)
 	if (sde_enc->cur_master)
 		lp = sde_connector_get_lp(
 		lp = sde_connector_get_lp(