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 <anajahi@codeaurora.org>
This commit is contained in:
Amine Najahi
2021-07-27 22:56:23 -04:00
committed by Gerrit - the friendly Code Review server
parent 1881acdb2b
commit e3c76571dc
2 changed files with 5 additions and 4 deletions

View File

@@ -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)) &&