aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-07-07 17:06:43 -0400
committerEric Anholt <eric@anholt.net>2010-08-01 22:03:46 -0400
commit2377b741abec485449d145e5065dd2b7dd64226f (patch)
treee6a1d160714fd53cbbbeeb9ac4f7297d71cdacdc /drivers
parent3ca87e82831f040986f27aef44fc61c8ddf6ee79 (diff)
drm/i915: fix FDI frequency check
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> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 81179fb5150e..7e57eaba5e25 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -323,6 +323,9 @@ struct intel_limit {
323#define IRONLAKE_DP_P1_MIN 1 323#define IRONLAKE_DP_P1_MIN 1
324#define IRONLAKE_DP_P1_MAX 2 324#define IRONLAKE_DP_P1_MAX 2
325 325
326/* FDI */
327#define IRONLAKE_FDI_FREQ 2700000 /* in kHz for mode->clock */
328
326static bool 329static bool
327intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, 330intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
328 int target, int refclk, intel_clock_t *best_clock); 331 int target, int refclk, intel_clock_t *best_clock);
@@ -2421,8 +2424,8 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc,
2421 struct drm_device *dev = crtc->dev; 2424 struct drm_device *dev = crtc->dev;
2422 if (HAS_PCH_SPLIT(dev)) { 2425 if (HAS_PCH_SPLIT(dev)) {
2423 /* FDI link clock is fixed at 2.7G */ 2426 /* FDI link clock is fixed at 2.7G */
2424 if (mode->clock * 3 > 27000 * 4) 2427 if (mode->clock * 3 > IRONLAKE_FDI_FREQ * 4)
2425 return MODE_CLOCK_HIGH; 2428 return false;
2426 } 2429 }
2427 2430
2428 drm_mode_set_crtcinfo(adjusted_mode, 0); 2431 drm_mode_set_crtcinfo(adjusted_mode, 0);