Ver código fonte

disp: msm: dsi: fix RFI mode set detection

Currently mode fixup function is called multiple times
in the same commit. This causes invalid combination of
DSI mode flags to be set when there is an RFI change
with proch compensation feature enabled.

This change modifies the mode switch condition for DMS
to compare internal dsi mode and flags and fixes the
dynamic clock change detection by using a single variable.

Change-Id: Iaf9c8ca7c6a27f26aefead399bc93fbbb02b404b
Signed-off-by: Amine Najahi <[email protected]>
Amine Najahi 3 anos atrás
pai
commit
e3c76571dc
2 arquivos alterados com 5 adições e 4 exclusões
  1. 2 3
      msm/dsi/dsi_display.c
  2. 3 1
      msm/dsi/dsi_drm.c

+ 2 - 3
msm/dsi/dsi_display.c

@@ -7336,7 +7336,7 @@ int dsi_display_validate_mode_change(struct dsi_display *display,
 		}
 
 		/* dynamic clk change use case */
-		if (cur_mode->pixel_clk_khz != adj_mode->pixel_clk_khz) {
+		if (display->dyn_bit_clk_pending) {
 			if (dyn_clk_caps->dyn_clk_support) {
 				DSI_DEBUG("dynamic clk change detected\n");
 				if ((adj_mode->dsi_mode_flags &
@@ -7362,6 +7362,7 @@ int dsi_display_validate_mode_change(struct dsi_display *display,
 					cur_mode->pixel_clk_khz,
 					adj_mode->pixel_clk_khz);
 			}
+			display->dyn_bit_clk_pending = false;
 		}
 	}
 
@@ -8612,8 +8613,6 @@ int dsi_display_update_dyn_bit_clk(struct dsi_display *display,
 			display->dyn_bit_clk, mode->priv_info->min_dsi_clk_hz, lanes, bpp,
 			mode->pixel_clk_khz);
 
-	display->dyn_bit_clk_pending = false;
-
 	return 0;
 }
 

+ 3 - 1
msm/dsi/dsi_drm.c

@@ -71,6 +71,7 @@ static void msm_parse_mode_priv_info(const struct msm_display_mode *msm_mode,
 		dsi_mode->timing.vdc_enabled = dsi_mode->priv_info->vdc_enabled;
 		dsi_mode->timing.vdc = &dsi_mode->priv_info->vdc;
 		dsi_mode->timing.pclk_scale = dsi_mode->priv_info->pclk_scale;
+		dsi_mode->timing.clk_rate_hz = dsi_mode->priv_info->clk_rate_hz;
 	}
 
 	if (msm_is_mode_seamless(msm_mode))
@@ -500,7 +501,8 @@ static bool dsi_bridge_mode_fixup(struct drm_bridge *bridge,
 			dsi_mode.dsi_mode_flags &= ~DSI_MODE_FLAG_DMS;
 
 		/* No DMS/VRR when drm pipeline is changing */
-		if (!drm_mode_equal(cur_mode, adjusted_mode) &&
+		if (!dsi_display_mode_match(&cur_dsi_mode, &dsi_mode,
+			DSI_MODE_MATCH_FULL_TIMINGS) &&
 			(!(dsi_mode.dsi_mode_flags & DSI_MODE_FLAG_VRR)) &&
 			(!(dsi_mode.dsi_mode_flags & DSI_MODE_FLAG_DYN_CLK)) &&
 			(!(dsi_mode.dsi_mode_flags & DSI_MODE_FLAG_POMS_TO_VID)) &&