commit b71dd2dd5b28fe7ca69175e5d49f9bbc627021fc Author: Florian Mickler Date: Tue Jul 7 12:22:28 2009 +0200 debug the channel_bits part this gives: [ 0.425863] [dmk:parse_lfp_panel_data], LVDS_OPTIONS SETTINGS: [ 0.425865] [dmk:parse_lfp_panel_data], panel_type: 2 [ 0.425867] [dmk:parse_lfp_panel_data], channel_bits 0 [ 0.425869] [dmk:parse_lfp_panel_data], mask: 12 [ 0.425871] [dmk:parse_lfp_panel_data], the_channel_bits: 0 [ 0.425873] [dmk:parse_lfp_panel_data], the backshifted bits: 0 what do you think about the find_best_PLL part? diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index ae3a58c..98430bf 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -115,12 +115,18 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv, lvds_options = find_section(bdb, BDB_LVDS_OPTIONS); if (!lvds_options) return; - + DRM_DEBUG_KMS("dmk","LVDS_OPTIONS SETTINGS:\n"); + DRM_DEBUG_KMS("dmk","panel_type: %d \n",lvds_options->panel_type); + DRM_DEBUG_KMS("dmk","channel_bits %d \n",lvds_options->lvds_channel_bits); + DRM_DEBUG_KMS("dmk","mask: %d \n",3<panel_type); /* Fetch lvds channel info */ channel_bits = lvds_options->lvds_channel_bits & (3 << lvds_options->panel_type); + DRM_DEBUG_KMS("dmk","the_channel_bits: %d \n",channel_bits); + DRM_DEBUG_KMS("dmk","the backshifted bits: %d \n",channel_bits >> lvds_options->panel_type); if (channel_bits) { channel_bits = channel_bits >> lvds_options->panel_type; + /* LVDS_DUAL_CHANNEL is 000...0010 (0x2) */ if (channel_bits == LVDS_DUAL_CHANNEL) dev_priv->lvds_dual_channel = 1; } diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 4699097..0391e6f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -642,20 +642,24 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, intel_clock_t clock; int err = target; - if (IS_I9XX(dev) && intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) && - ((I915_READ(LVDS) & LVDS_PORT_EN) != 0 || - dev_priv->lvds_dual_channel)) { + if (IS_I9XX(dev) && intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)){ /* * For LVDS, if the panel is on, just rely on its current - * settings for dual-channel. We haven't figured out how to - * reliably set up different single/dual channel state, if we - * even can. + * settings for dual-channel. + * Else we rely on the bios panel properties. */ - if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) == - LVDS_CLKB_POWER_UP) - clock.p2 = limit->p2.p2_fast; - else - clock.p2 = limit->p2.p2_slow; + if (I915_READ(LVDS) & LVDS_PORT_EN) { + if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) == + LVDS_CLKB_POWER_UP) + clock.p2 = limit->p2.p2_fast; + else + clock.p2 = limit->p2.p2_slow; + } else { + if ( dev_priv->lvds_dual_channel ) + clock.p2 = limit->p2.p2_fast; + else + clock.p2 = limit->p2.p2_slow; + } } else { if (target < limit->p2.dot_limit) clock.p2 = limit->p2.p2_slow;