aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-08 06:58:33 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-10 15:53:49 -0500
commit539526b4137bc0e7a8806c38c8522f226814a0e6 (patch)
treed3feec418fcebe2fda662d30a074ee2d39d5faf5 /drivers/gpu
parent68d18ad7fbc16288aa230ec0ffb4416fd4363c87 (diff)
drm/i915: disable cpt phase pointer fdi rx workaround
We've originally added this in commit 291427f5fdadec6e4be2924172e83588880e1539 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Fri Jul 29 12:42:37 2011 -0700 drm/i915: apply phase pointer override on SNB+ too and then copy-pasted it over to ivb/ppt. The w/a was originally added for ilk/ibx in commit 5b2adf897146edeac6a1e438fb67b5a53dbbdf34 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu Oct 7 16:01:15 2010 -0700 drm/i915: add Ironlake clock gating workaround for FDI link training and fixed up a bit in commit 6f06ce184c765fd8d50669a8d12fdd566c920859 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Tue Jan 4 15:09:38 2011 -0800 drm/i915: set phase sync pointer override enable before setting phase sync pointer It turns out that this w/a isn't actually required on cpt/ppt and positively harmful on ivb/ppt when using fdi B/C links - it results in a black screen occasionally, with seemingfully everything working as it should. The only failure indication I've found in the hw is that eventually (but not right after the modeset completes) a pipe underrun is signalled. Big thanks to Arthur Runyan for all the ideas for registers to check and changes to test, otherwise I couldn't ever have tracked this down! Cc: "Runyan, Arthur J" <arthur.j.runyan@intel.com> Cc: stable@vger.kernel.org Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ce7fc519f614..82267b27b8f6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2428,18 +2428,6 @@ static void intel_fdi_normal_train(struct drm_crtc *crtc)
2428 FDI_FE_ERRC_ENABLE); 2428 FDI_FE_ERRC_ENABLE);
2429} 2429}
2430 2430
2431static void cpt_phase_pointer_enable(struct drm_device *dev, int pipe)
2432{
2433 struct drm_i915_private *dev_priv = dev->dev_private;
2434 u32 flags = I915_READ(SOUTH_CHICKEN1);
2435
2436 flags |= FDI_PHASE_SYNC_OVR(pipe);
2437 I915_WRITE(SOUTH_CHICKEN1, flags); /* once to unlock... */
2438 flags |= FDI_PHASE_SYNC_EN(pipe);
2439 I915_WRITE(SOUTH_CHICKEN1, flags); /* then again to enable */
2440 POSTING_READ(SOUTH_CHICKEN1);
2441}
2442
2443static void ivb_modeset_global_resources(struct drm_device *dev) 2431static void ivb_modeset_global_resources(struct drm_device *dev)
2444{ 2432{
2445 struct drm_i915_private *dev_priv = dev->dev_private; 2433 struct drm_i915_private *dev_priv = dev->dev_private;
@@ -2614,8 +2602,6 @@ static void gen6_fdi_link_train(struct drm_crtc *crtc)
2614 POSTING_READ(reg); 2602 POSTING_READ(reg);
2615 udelay(150); 2603 udelay(150);
2616 2604
2617 cpt_phase_pointer_enable(dev, pipe);
2618
2619 for (i = 0; i < 4; i++) { 2605 for (i = 0; i < 4; i++) {
2620 reg = FDI_TX_CTL(pipe); 2606 reg = FDI_TX_CTL(pipe);
2621 temp = I915_READ(reg); 2607 temp = I915_READ(reg);
@@ -2748,8 +2734,6 @@ static void ivb_manual_fdi_link_train(struct drm_crtc *crtc)
2748 POSTING_READ(reg); 2734 POSTING_READ(reg);
2749 udelay(150); 2735 udelay(150);
2750 2736
2751 cpt_phase_pointer_enable(dev, pipe);
2752
2753 for (i = 0; i < 4; i++) { 2737 for (i = 0; i < 4; i++) {
2754 reg = FDI_TX_CTL(pipe); 2738 reg = FDI_TX_CTL(pipe);
2755 temp = I915_READ(reg); 2739 temp = I915_READ(reg);
@@ -2888,17 +2872,6 @@ static void ironlake_fdi_pll_disable(struct intel_crtc *intel_crtc)
2888 udelay(100); 2872 udelay(100);
2889} 2873}
2890 2874
2891static void cpt_phase_pointer_disable(struct drm_device *dev, int pipe)
2892{
2893 struct drm_i915_private *dev_priv = dev->dev_private;
2894 u32 flags = I915_READ(SOUTH_CHICKEN1);
2895
2896 flags &= ~(FDI_PHASE_SYNC_EN(pipe));
2897 I915_WRITE(SOUTH_CHICKEN1, flags); /* once to disable... */
2898 flags &= ~(FDI_PHASE_SYNC_OVR(pipe));
2899 I915_WRITE(SOUTH_CHICKEN1, flags); /* then again to lock */
2900 POSTING_READ(SOUTH_CHICKEN1);
2901}
2902static void ironlake_fdi_disable(struct drm_crtc *crtc) 2875static void ironlake_fdi_disable(struct drm_crtc *crtc)
2903{ 2876{
2904 struct drm_device *dev = crtc->dev; 2877 struct drm_device *dev = crtc->dev;
@@ -2925,8 +2898,6 @@ static void ironlake_fdi_disable(struct drm_crtc *crtc)
2925 /* Ironlake workaround, disable clock pointer after downing FDI */ 2898 /* Ironlake workaround, disable clock pointer after downing FDI */
2926 if (HAS_PCH_IBX(dev)) { 2899 if (HAS_PCH_IBX(dev)) {
2927 I915_WRITE(FDI_RX_CHICKEN(pipe), FDI_RX_PHASE_SYNC_POINTER_OVR); 2900 I915_WRITE(FDI_RX_CHICKEN(pipe), FDI_RX_PHASE_SYNC_POINTER_OVR);
2928 } else if (HAS_PCH_CPT(dev)) {
2929 cpt_phase_pointer_disable(dev, pipe);
2930 } 2901 }
2931 2902
2932 /* still set train pattern 1 */ 2903 /* still set train pattern 1 */