[PATCH 3/3] drm/i915: set CB tuning also for the reduce clock

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

 



Hi

2013/4/4 Daniel Vetter <daniel.vetter at ffwll.ch>:
> Since the ratio is different, we also need to pass in the parameters
> for the reduced clock. Might or might not reduce flicker for the
> auto-downclocking on lvds/eDP.

After this patch, my suggestion to add ironlake_calculate_fp() gets
even stronger :)

Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>

>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index cb3e23f..c7c135c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5374,7 +5374,8 @@ static void ironlake_fdi_set_m_n(struct drm_crtc *crtc)
>  }
>
>  static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc,
> -                                     intel_clock_t *clock, u32 *fp)
> +                                     intel_clock_t *clock, u32 *fp,
> +                                     intel_clock_t *reduced_clock, u32 *fp2)
>  {
>         struct drm_crtc *crtc = &intel_crtc->base;
>         struct drm_device *dev = crtc->dev;
> @@ -5416,6 +5417,9 @@ static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc,
>         if (clock->m < factor * clock->n)
>                 *fp |= FP_CB_TUNE;
>
> +       if (fp2 && (reduced_clock->m < factor * reduced_clock->n))
> +               *fp2 |= FP_CB_TUNE;
> +
>         dpll = 0;
>
>         if (is_lvds)
> @@ -5531,7 +5535,8 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
>                 fp2 = reduced_clock.n << 16 | reduced_clock.m1 << 8 |
>                         reduced_clock.m2;
>
> -       dpll = ironlake_compute_dpll(intel_crtc, &clock, &fp);
> +       dpll = ironlake_compute_dpll(intel_crtc, &clock, &fp, &reduced_clock,
> +                                    has_reduced_clock ? &fp2 : NULL);
>
>         DRM_DEBUG_KMS("Mode for pipe %d:\n", pipe);
>         drm_mode_debug_printmodeline(mode);
> --
> 1.7.10.4
>
> _______________________________________________
> 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