drm/i915: push DDI FDI link training on enable to CRT encoder
authorJani Nikula <jani.nikula@intel.com>
Thu, 5 Oct 2017 10:52:13 +0000 (13:52 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 6 Oct 2017 08:30:44 +0000 (11:30 +0300)
Reduce encoder specific checks from CRTC code.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6903136894ffcf47f7511900f3c8d53f760ef6b1.1507200657.git.jani.nikula@intel.com
drivers/gpu/drm/i915/intel_crt.c
drivers/gpu/drm/i915/intel_display.c

index b43e8e16da37c0fd77b2dad97c058931e915ae45..2abe556ccaf5e2331af83f9692b82629a95ad944 100644 (file)
@@ -269,6 +269,8 @@ static void hsw_pre_enable_crt(struct intel_encoder *encoder,
        WARN_ON(!intel_crtc->config->has_pch_encoder);
 
        intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
+
+       dev_priv->display.fdi_link_train(intel_crtc, pipe_config);
 }
 
 static void hsw_enable_crt(struct intel_encoder *encoder,
index b55944d8149bff1d2239522d89572b9f1d1f2225..9f2bf3b3f759c66242a3c9aa77093834386a74bf 100644 (file)
@@ -5523,9 +5523,6 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
 
        intel_encoders_pre_enable(crtc, pipe_config, old_state);
 
-       if (intel_crtc->config->has_pch_encoder)
-               dev_priv->display.fdi_link_train(intel_crtc, pipe_config);
-
        if (!transcoder_is_dsi(cpu_transcoder))
                intel_ddi_enable_pipe_clock(pipe_config);