[PATCH 2/8] drm/i915: replace ad-hoc dual-link lvds checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

2012/11/5 Daniel Vetter <daniel.vetter at ffwll.ch>:
> ... with is_dual_link_lvds introduced in
>
> commit b03543857fd75876b96e10d4320b775e95041bb7
> Author: Takashi Iwai <tiwai at 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.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1ad6d34..0973391 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -690,8 +690,7 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
>         intel_clock_t clock;
>         int err = target;
>
> -       if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) &&
> -           (I915_READ(LVDS)) != 0) {
> +       if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {

This chunk doesn't seem to do exactly what the commit message says. I
tried to git-blame the lines and got a little confused. Maybe this
chunk deserves its own commit with an explanation. Maybe what you
really want to do is to revert commit
832cc28d5bc676331e6376d940ae45d5937aa688 instead of removing the line?
If you really want to remove the line, you may also update the comment
immediately below?

The chunks below look correct.

>                 /*
>                  * For LVDS, if the panel is on, just rely on its current
>                  * settings for dual-channel.  We haven't figured out how to
> @@ -766,8 +765,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
>                         lvds_reg = PCH_LVDS;
>                 else
>                         lvds_reg = LVDS;
> -               if ((I915_READ(lvds_reg) & LVDS_CLKB_POWER_MASK) ==
> -                   LVDS_CLKB_POWER_UP)
> +               if (is_dual_link_lvds(dev_priv, lvds_reg))
>                         clock.p2 = limit->p2.p2_fast;
>                 else
>                         clock.p2 = limit->p2.p2_slow;
> @@ -5360,7 +5358,7 @@ static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc,
>         if (is_lvds) {
>                 if ((intel_panel_use_ssc(dev_priv) &&
>                      dev_priv->lvds_ssc_freq == 100) ||
> -                   (I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP)
> +                   is_dual_link_lvds(dev_priv, PCH_LVDS))
>                         factor = 25;
>         } else if (is_sdvo && is_tv)
>                 factor = 20;
> --
> 1.7.11.7
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux