aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2013-02-08 09:35:37 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-02-19 18:21:39 -0500
commit24a1f16de97c4cf0029d9acd04be06db32208726 (patch)
treeab8168b54c640f80a44defd0d4cf7211fc01c074
parent1d7aaa0cfe3d1b5ee23958fce71973e3ae9e52e4 (diff)
drm/i915: disable shared panel fitter for pipe
If encoder is switched off by BIOS, but the panel fitter is left on, we never try to turn off the panel fitter and leave it still attached to the pipe - which can cause blurry output elsewhere. Based on work by Chris Wilson <chris@chris-wilson.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58867 Cc: stable@vger.kernel.org Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Tested-by: Andreas Sturmlechner <andreas.sturmlechner@gmail.com> [danvet: Remove the redundant HAS_PCH_SPLIT check and add a tiny comment.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0dfecaf599ff..fc9b98794b25 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3637,6 +3637,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
3637 struct intel_encoder *encoder; 3637 struct intel_encoder *encoder;
3638 int pipe = intel_crtc->pipe; 3638 int pipe = intel_crtc->pipe;
3639 int plane = intel_crtc->plane; 3639 int plane = intel_crtc->plane;
3640 u32 pctl;
3640 3641
3641 3642
3642 if (!intel_crtc->active) 3643 if (!intel_crtc->active)
@@ -3656,6 +3657,13 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
3656 3657
3657 intel_disable_plane(dev_priv, plane, pipe); 3658 intel_disable_plane(dev_priv, plane, pipe);
3658 intel_disable_pipe(dev_priv, pipe); 3659 intel_disable_pipe(dev_priv, pipe);
3660
3661 /* Disable pannel fitter if it is on this pipe. */
3662 pctl = I915_READ(PFIT_CONTROL);
3663 if ((pctl & PFIT_ENABLE) &&
3664 ((pctl & PFIT_PIPE_MASK) >> PFIT_PIPE_SHIFT) == pipe)
3665 I915_WRITE(PFIT_CONTROL, 0);
3666
3659 intel_disable_pll(dev_priv, pipe); 3667 intel_disable_pll(dev_priv, pipe);
3660 3668
3661 intel_crtc->active = false; 3669 intel_crtc->active = false;