Commit 3860b2ec authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Suppress spurious CPU FIFO underruns on ILK-IVB

We still get spurious pipe underruns on ILK/SNB/IVB under two
circumstances when dealing with PCH ports:
* When the pipe has been disabled, but FDI RX/TX is still enabled
* During FDI link training

Both cases seem to happen at least when we do VGA+HDMI cloning
from the same pipe. I don't think I've seen them when not cloning,
but can't be 100% sure.

Disable underrun reporting around those places to eliminate the
dmesg errors.

Testcase: igt/kms_setmode/basic-clone-single-crtc
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1448050160-14124-1-git-send-email-ville.syrjala@linux.intel.comAcked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent b6e4d534
...@@ -4137,6 +4137,12 @@ static void ironlake_pch_enable(struct drm_crtc *crtc) ...@@ -4137,6 +4137,12 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)
I915_WRITE(FDI_RX_TUSIZE1(pipe), I915_WRITE(FDI_RX_TUSIZE1(pipe),
I915_READ(PIPE_DATA_M1(pipe)) & TU_SIZE_MASK); I915_READ(PIPE_DATA_M1(pipe)) & TU_SIZE_MASK);
/*
* Sometimes spurious CPU pipe underruns happen during FDI
* training, at least with VGA+HDMI cloning. Suppress them.
*/
intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
/* For PCH output, training FDI link */ /* For PCH output, training FDI link */
dev_priv->display.fdi_link_train(crtc); dev_priv->display.fdi_link_train(crtc);
...@@ -4170,6 +4176,8 @@ static void ironlake_pch_enable(struct drm_crtc *crtc) ...@@ -4170,6 +4176,8 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)
intel_fdi_normal_train(crtc); intel_fdi_normal_train(crtc);
intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, true);
/* For PCH DP, enable TRANS_DP_CTL */ /* For PCH DP, enable TRANS_DP_CTL */
if (HAS_PCH_CPT(dev) && intel_crtc->config->has_dp_encoder) { if (HAS_PCH_CPT(dev) && intel_crtc->config->has_dp_encoder) {
const struct drm_display_mode *adjusted_mode = const struct drm_display_mode *adjusted_mode =
...@@ -5062,12 +5070,22 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) ...@@ -5062,12 +5070,22 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
drm_crtc_vblank_off(crtc); drm_crtc_vblank_off(crtc);
assert_vblank_disabled(crtc); assert_vblank_disabled(crtc);
/*
* Sometimes spurious CPU pipe underruns happen when the
* pipe is already disabled, but FDI RX/TX is still enabled.
* Happens at least with VGA+HDMI cloning. Suppress them.
*/
if (intel_crtc->config->has_pch_encoder)
intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
intel_disable_pipe(intel_crtc); intel_disable_pipe(intel_crtc);
ironlake_pfit_disable(intel_crtc, false); ironlake_pfit_disable(intel_crtc, false);
if (intel_crtc->config->has_pch_encoder) if (intel_crtc->config->has_pch_encoder) {
ironlake_fdi_disable(crtc); ironlake_fdi_disable(crtc);
intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, true);
}
for_each_encoder_on_crtc(dev, crtc, encoder) for_each_encoder_on_crtc(dev, crtc, encoder)
if (encoder->post_disable) if (encoder->post_disable)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment