diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-26 11:22:08 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-29 06:23:55 -0500 |
commit | a210b028f07690c127733addbbe137e8f4cad30c (patch) | |
tree | 3290e9a2091a9b67a9c564d7279d636d342fd432 /drivers/gpu/drm/i915 | |
parent | dafd226c4f54eded10ba43c37789a6aa20b59c32 (diff) |
drm/i915: replace ad-hoc dual-link lvds checks
... with is_dual_link_lvds introduced in
commit b03543857fd75876b96e10d4320b775e95041bb7
Author: Takashi Iwai <tiwai@suse.de>
Date: Tue Mar 20 13:07:05 2012 +0100
drm/i915: Check VBIOS value for determining LVDS dual channel mode, too
All these checks predate this commit and have simply been overlooked.
Since we don't support switching between single-link and dual-link
modes anyway, this different checks could at best only get in the way
of refactorings, and in the worst case cause inconsistencies.
v2: Update the comment, we now have a solid way to figure out whether
we need dual-link lvds or not (falling back to vbt values as a last
resort). We still don't know how to switch between dual-link and
single link so leave that part intact. I'm not sure though whether
switching between these two modes makes any sense - we always drive
the panel at its fixed mode (with a fixed bpc) anyway ...
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 55d3e3dbc137..be19b6d1ca52 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -690,13 +690,11 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | |||
690 | intel_clock_t clock; | 690 | intel_clock_t clock; |
691 | int err = target; | 691 | int err = target; |
692 | 692 | ||
693 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) && | 693 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { |
694 | (I915_READ(LVDS)) != 0) { | ||
695 | /* | 694 | /* |
696 | * For LVDS, if the panel is on, just rely on its current | 695 | * For LVDS just rely on its current settings for dual-channel. |
697 | * settings for dual-channel. We haven't figured out how to | 696 | * We haven't figured out how to reliably set up different |
698 | * reliably set up different single/dual channel state, if we | 697 | * single/dual channel state, if we even can. |
699 | * even can. | ||
700 | */ | 698 | */ |
701 | if (is_dual_link_lvds(dev_priv, LVDS)) | 699 | if (is_dual_link_lvds(dev_priv, LVDS)) |
702 | clock.p2 = limit->p2.p2_fast; | 700 | clock.p2 = limit->p2.p2_fast; |
@@ -766,8 +764,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | |||
766 | lvds_reg = PCH_LVDS; | 764 | lvds_reg = PCH_LVDS; |
767 | else | 765 | else |
768 | lvds_reg = LVDS; | 766 | lvds_reg = LVDS; |
769 | if ((I915_READ(lvds_reg) & LVDS_CLKB_POWER_MASK) == | 767 | if (is_dual_link_lvds(dev_priv, lvds_reg)) |
770 | LVDS_CLKB_POWER_UP) | ||
771 | clock.p2 = limit->p2.p2_fast; | 768 | clock.p2 = limit->p2.p2_fast; |
772 | else | 769 | else |
773 | clock.p2 = limit->p2.p2_slow; | 770 | clock.p2 = limit->p2.p2_slow; |
@@ -5359,7 +5356,7 @@ static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc, | |||
5359 | if (is_lvds) { | 5356 | if (is_lvds) { |
5360 | if ((intel_panel_use_ssc(dev_priv) && | 5357 | if ((intel_panel_use_ssc(dev_priv) && |
5361 | dev_priv->lvds_ssc_freq == 100) || | 5358 | dev_priv->lvds_ssc_freq == 100) || |
5362 | (I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP) | 5359 | is_dual_link_lvds(dev_priv, PCH_LVDS)) |
5363 | factor = 25; | 5360 | factor = 25; |
5364 | } else if (is_sdvo && is_tv) | 5361 | } else if (is_sdvo && is_tv) |
5365 | factor = 20; | 5362 | factor = 20; |