[Intel-gfx] [PATCH] drm/i915: fix HDMI clock readout on Haswell

Jesse Barnes jbarnes at virtuousgeek.org
Wed Jan 22 21:52:56 CET 2014


On Wed, 22 Jan 2014 18:39:26 -0200
Paulo Zanoni <przanoni at gmail.com> wrote:

> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
> 
> This stops the WARNs when booting with an HDMI monitor connected.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index fe2967e..cb6a65e 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -663,7 +663,7 @@ static int intel_ddi_calc_wrpll_link(struct drm_i915_private *dev_priv,
>  	p = (wrpll & WRPLL_DIVIDER_POST_MASK) >> WRPLL_DIVIDER_POST_SHIFT;
>  	n = (wrpll & WRPLL_DIVIDER_FB_MASK) >> WRPLL_DIVIDER_FB_SHIFT;
>  
> -	return (LC_FREQ * n) / (p * r);
> +	return ((LC_FREQ * n) * 100) / (p * r);
>  }
>  
>  static void intel_ddi_clock_get(struct intel_encoder *encoder,

Yep, looks like units fail.  And I failed to replace LC_FREQ with
refclk when I added the WRPLL refclk fetching... I'll post an updated
patch with both fixed.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list