* [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* Re: [PATCH] drm/i915: Disable FDI link before retraining.
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
0 siblings, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2010-08-06 21:21 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Dave Airlie
[-- Attachment #1.1: Type: text/plain, Size: 510 bytes --]
On Tue, 3 Aug 2010 08:12:12 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 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.
With the drm fix to not re-dpms the crtc, is this one still needed?
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Disable FDI link before retraining.
2010-08-06 21:21 ` Eric Anholt
@ 2010-08-06 21:57 ` Chris Wilson
2010-08-09 9:04 ` Chris Wilson
0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2010-08-06 21:57 UTC (permalink / raw)
To: Eric Anholt, intel-gfx; +Cc: Dave Airlie
On Fri, 06 Aug 2010 14:21:59 -0700, Eric Anholt <eric@anholt.net> wrote:
> On Tue, 3 Aug 2010 08:12:12 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > 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.
>
> With the drm fix to not re-dpms the crtc, is this one still needed?
No. I had to disable both this and Dave Airlie's double dpms defense, but
with the drm crtc dpms fix this patch is no longer required.
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Disable FDI link before retraining.
2010-08-06 21:57 ` Chris Wilson
@ 2010-08-09 9:04 ` Chris Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2010-08-09 9:04 UTC (permalink / raw)
To: Eric Anholt, intel-gfx; +Cc: Dave Airlie
On Fri, 06 Aug 2010 22:57:33 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Fri, 06 Aug 2010 14:21:59 -0700, Eric Anholt <eric@anholt.net> wrote:
> > With the drm fix to not re-dpms the crtc, is this one still needed?
>
> No. I had to disable both this and Dave Airlie's double dpms defense, but
> with the drm crtc dpms fix this patch is no longer required.
I was mistaken. I tried the wrong test case, in order to reproduce you
have to change the fb size for which apparently userspace also does
dpms-off/-on around the add fb. Not sure yet why this isn't caught and
reduced to a no-op by drm-core.
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [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.