From 4e497d4b6539ab07546d08fa3a392d224480a03c Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Fri, 21 May 2010 22:06:26 +0800 Subject: [PATCH] drm/i915: Use the max link rate Signed-off-by: Zhao Yakui --- drivers/gpu/drm/i915/intel_dp.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 48ce732..0fecf60 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -496,12 +496,12 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, static int bws[2] = { DP_LINK_BW_1_62, DP_LINK_BW_2_7 }; for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) { - for (clock = 0; clock <= max_clock; clock++) { - int link_avail = intel_dp_link_clock(bws[clock]) * lane_count; + int link_avail = intel_dp_link_clock(bws[max_clock]) * + lane_count; if (intel_dp_link_required(encoder->dev, intel_output, mode->clock) <= link_avail) { - dp_priv->link_bw = bws[clock]; + dp_priv->link_bw = bws[max_clock]; dp_priv->lane_count = lane_count; adjusted_mode->clock = intel_dp_link_clock(dp_priv->link_bw); DRM_DEBUG_KMS("Display port link bw %02x lane " @@ -510,7 +510,6 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, adjusted_mode->clock); return true; } - } } return false; } -- 1.5.4.5