Ver Fonte

disp: msm: sde: fix null check for encoder dsc disable

There are some scenarios where connectors can be
null during encoder dsc disable. Update the null
check to avoid error message during these scenarios.

Change-Id: I598a644f19aecf0b7d8c989a75575329903678dd
Signed-off-by: Krishna Manikandan <[email protected]>
Signed-off-by: Narendra Muppalla <[email protected]>
Krishna Manikandan há 5 anos atrás
pai
commit
8dd8a0f1bb
1 ficheiros alterados com 8 adições e 2 exclusões
  1. 8 2
      msm/sde/sde_encoder_dce.c

+ 8 - 2
msm/sde/sde_encoder_dce.c

@@ -703,13 +703,19 @@ static void _dce_dsc_disable(struct sde_encoder_virt *sde_enc)
 	struct sde_hw_ctl *hw_ctl = NULL;
 	struct sde_hw_intf_cfg_v1 cfg;
 
-	if (!sde_enc || !sde_enc->phys_encs[0] ||
-			!sde_enc->phys_encs[0]->connector) {
+	if (!sde_enc || !sde_enc->phys_encs[0]) {
 		SDE_ERROR("invalid params %d %d\n",
 			!sde_enc, sde_enc ? !sde_enc->phys_encs[0] : -1);
 		return;
 	}
 
+	/*
+	 * Connector can be null if the first virt modeset after suspend
+	 * is called with dynamic clock or dms enabled.
+	 */
+	if (!sde_enc->phys_encs[0]->connector)
+		return;
+
 	if (sde_enc->cur_master)
 		hw_ctl = sde_enc->cur_master->hw_ctl;