Skip to content

Commit 2cb811d

Browse files
committed
drm/i915/vlv_dsi: Double pixelclock on read-back for dual-link panels
In intel_dsi_get_config() double the pclk returned by foo_dsi_get_pclk() for dual-link panels. This fixes the following WARN triggering: i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in pixel_rate (expected 235710, found 118056) i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in hw.pipe_mode.crtc_clock (expected 235710, found 118056) i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in hw.adjusted_mode.crtc_clock (expected 235710, found 118056) i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in port_clock (expected 235710, found 118056) ------------[ cut here ]------------ pipe state doesn't match! WARNING: CPU: 3 PID: 136 at drivers/gpu/drm/i915/display/intel_display.c:9125 intel_display_finish_reset+0x1bd3/0x2050 [i915] ... This has been tested on a Xiaomi Mi Pad 2 (with CHT x5-Z8500 SoC) tablet, with a 1536x2048 dual-link DSI panel. Note this fix was taken from icl_dsi.c which does the same in its get_config(). Cc: Tsuchiya Yuto <kitakar@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent be0a8a1 commit 2cb811d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpu/drm/i915/display/vlv_dsi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,9 @@ static void intel_dsi_get_config(struct intel_encoder *encoder,
12581258
struct intel_crtc_state *pipe_config)
12591259
{
12601260
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
1261+
struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
12611262
u32 pclk;
1263+
12621264
drm_dbg_kms(&dev_priv->drm, "\n");
12631265

12641266
pipe_config->output_types |= BIT(INTEL_OUTPUT_DSI);
@@ -1270,6 +1272,9 @@ static void intel_dsi_get_config(struct intel_encoder *encoder,
12701272
pclk = vlv_dsi_get_pclk(encoder, pipe_config);
12711273
}
12721274

1275+
if (intel_dsi->dual_link)
1276+
pclk *= 2;
1277+
12731278
if (pclk) {
12741279
pipe_config->hw.adjusted_mode.crtc_clock = pclk;
12751280
pipe_config->port_clock = pclk;

0 commit comments

Comments
 (0)