All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Disable FDI link before retraining.
@ 2010-08-03  7:12 Chris Wilson
  2010-08-06 21:21 ` Eric Anholt
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2010-08-03  7:12 UTC (permalink / raw)
  To: intel-gfx; +Cc: Dave Airlie

At the moment, we have a habit of occasionally performing a double dpms
on. This confuses the FDI link training performed on a dpms on as we can
only adjust the settings whilst the link is disabled and the second
attempt at training fails. A simple defensive workaround is to always
disable the link prior to adjustment and re-enabling on dpms on.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c |    8 ++++++++
 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 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);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-09  9:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03  7:12 [PATCH] drm/i915: Disable FDI link before retraining Chris Wilson
2010-08-06 21:21 ` Eric Anholt
2010-08-06 21:57   ` Chris Wilson
2010-08-09  9:04     ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.