Sfoglia il codice sorgente

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

qctecmdr 5 anni fa
parent
commit
a6c09b6f84
1 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. 8 2
      msm/sde/sde_encoder_dce.c

+ 8 - 2
msm/sde/sde_encoder_dce.c

@@ -691,13 +691,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;