@@ -506,6 +506,7 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
struct mipi_config *mipi_config = dev_priv->vbt.dsi.config;
struct mipi_pps_data *pps = dev_priv->vbt.dsi.pps;
struct drm_display_mode *mode = dev_priv->vbt.lfp_lvds_vbt_mode;
+ struct drm_display_mode *curr;
u32 bpp;
u32 tlpx_ns, extra_byte_count, bitrate, tlpx_ui;
u32 ui_num, ui_den;
@@ -583,6 +584,23 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
} else
burst_mode_ratio = 100;
+ /*
+ * On BYT / CRC the GOP sometimes picks a slightly different pclk,
+ * read back the GOP configured pclk and prefer it over ours.
+ */
+ if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
+ curr = intel_encoder_current_mode(&intel_dsi->base);
+ if (curr) {
+ DRM_DEBUG_KMS("Calculated pclk %d GOP %d\n",
+ pclk, curr->clock);
+ if (curr->clock >= (pclk * 9 / 10) &&
+ curr->clock <= (pclk * 11 / 10))
+ pclk = curr->clock;
+
+ kfree(curr);
+ }
+ }
+
intel_dsi->burst_mode_ratio = burst_mode_ratio;
intel_dsi->pclk = pclk;