All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix FDI frequency check
@ 2010-07-07 21:06 Jesse Barnes
  2010-07-08 18:21 ` Eric Anholt
  0 siblings, 1 reply; 2+ messages in thread
From: Jesse Barnes @ 2010-07-07 21:06 UTC (permalink / raw)
  To: intel-gfx, zhenyuw

Since mode->clock is in kHz we should be checking against 2700000
instead of just 27000.  This patch gets my x201s working again (well
working as well as it ever was anyway).

When looking for this I also noticed we set link_bw to 270000, but the
calculation is different.  Does it also need to use kHz or we using
10kHz internally?

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c6bcc2f..dfbdf88 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -322,6 +322,9 @@ struct intel_limit {
 #define IRONLAKE_DP_P1_MIN		1
 #define IRONLAKE_DP_P1_MAX		2
 
+/* FDI */
+#define IRONLAKE_FDI_FREQ		2700000 /* in kHz for mode->clock */
+
 static bool
 intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
 		    int target, int refclk, intel_clock_t *best_clock);
@@ -2410,7 +2413,7 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc,
 	struct drm_device *dev = crtc->dev;
 	if (HAS_PCH_SPLIT(dev)) {
 		/* FDI link clock is fixed at 2.7G */
-		if (mode->clock * 3 > 27000 * 4)
+		if (mode->clock * 3 > IRONLAKE_FDI_FREQ * 4)
 			return false;
 	}

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

* Re: [PATCH] drm/i915: fix FDI frequency check
  2010-07-07 21:06 [PATCH] drm/i915: fix FDI frequency check Jesse Barnes
@ 2010-07-08 18:21 ` Eric Anholt
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Anholt @ 2010-07-08 18:21 UTC (permalink / raw)
  To: Jesse Barnes, intel-gfx, zhenyuw


[-- Attachment #1.1: Type: text/plain, Size: 598 bytes --]

On Wed, 7 Jul 2010 14:06:43 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> Since mode->clock is in kHz we should be checking against 2700000
> instead of just 27000.  This patch gets my x201s working again (well
> working as well as it ever was anyway).
> 
> When looking for this I also noticed we set link_bw to 270000, but the
> calculation is different.  Does it also need to use kHz or we using
> 10kHz internally?
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Worked for me.  I've put a squash of the bad patch into this one in that
place in the history.

[-- 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] 2+ messages in thread

end of thread, other threads:[~2010-07-08 18:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-07 21:06 [PATCH] drm/i915: fix FDI frequency check Jesse Barnes
2010-07-08 18:21 ` Eric Anholt

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.