2014/1/22 Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>: > Forgot to convert to using the refclk variable when I added refclk > readout support, and Paulo noticed the resulting calculation was off due > to the way p & r are stored. > > Reported-by: Paulo Zanoni <przanoni@xxxxxxxxx> > Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx> Tested-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_ddi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c > index fe2967e..cd65dd0 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -663,7 +663,8 @@ 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); > + /* Convert to KHz, p & r have a fixed point portion */ > + return (refclk * n * 100) / (p * r); > } > > static void intel_ddi_clock_get(struct intel_encoder *encoder, > -- > 1.8.3.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Paulo Zanoni _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx