drm/msm/dsi-staging: toggle resync fifo after clock on

The resync retime FIFO in the DSI PHY needs to be toggled every time
there is a clock rate change in order to synchronize the data paths.
This FIFO should be toggled only after the display clock controller
sets the source for the DSI branch clocks to be the DSI PLL and the
enables the branch clock, otherwise it can lead to unintended
artifacts on the screen.

CRs-Fixed: 2196279
Change-Id: I3f5e230bff84e25f1644bf47cb6c5d975f1450eb
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_phy.c b/drivers/gpu/drm/msm/dsi-staging/dsi_phy.c
index cc74de2..6a7a84c 100644
--- a/drivers/gpu/drm/msm/dsi-staging/dsi_phy.c
+++ b/drivers/gpu/drm/msm/dsi-staging/dsi_phy.c
@@ -752,6 +752,16 @@
 	return 0;
 }
 
+void dsi_phy_toggle_resync_fifo(struct msm_dsi_phy *phy)
+{
+	if (!phy)
+		return;
+
+	if (!phy->hw.ops.toggle_resync_fifo)
+		return;
+
+	phy->hw.ops.toggle_resync_fifo(&phy->hw);
+}
 
 int dsi_phy_set_ulps(struct msm_dsi_phy *phy, struct dsi_host_config *config,
 		bool enable, bool clamp_enabled)