drm/i915: Disable FDI link before retraining.
diff mbox

Message ID 1280819532-2722-1-git-send-email-chris@chris-wilson.co.uk
State Deferred, archived
Headers show

Commit Message

Chris Wilson Aug. 3, 2010, 7:12 a.m. UTC
None

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index be81483..e9da266 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1897,6 +1897,14 @@  static int ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
 			/* enable eDP PLL */
 			ironlake_enable_pll_edp(crtc);
 		} else {
+			/* unlock the FDI registers for retraining */
+			temp = I915_READ(fdi_tx_reg);
+			if (temp & FDI_TX_ENABLE)
+				I915_WRITE(fdi_tx_reg, temp & ~FDI_TX_ENABLE);
+
+			temp = I915_READ(fdi_rx_reg);
+			if (temp & FDI_RX_ENABLE)
+				I915_WRITE(fdi_rx_reg, temp & ~FDI_RX_ENABLE);
 
 			/* enable PCH FDI RX PLL, wait warmup plus DMI latency */
 			temp = I915_READ(fdi_rx_reg);