[PATCH 1/3] drm/i915: Show the computed dotclock in the debug logs

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

 



On Sun, Jun 09, 2013 at 09:51:28PM +0200, Daniel Vetter wrote:
> On Sun, Jun 9, 2013 at 7:23 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > Reviewing the dotclock computation from the refclk and dividers is a
> > very useful step in manually checking the register configuration.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c |   23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index e2e2173..1333a56 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -4844,6 +4844,19 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc)
> >         POSTING_READ(PIPECONF(intel_crtc->pipe));
> >  }
> >
> > +static u64 compute_dotclock(int refclk, const intel_clock_t *clock)
> > +{
> > +       u64 dotclock;
> > +
> > +       dotclock = refclk;
> > +       dotclock *= 5 * (clock->m1 + 2) + clock->m2 + 2;
> > +       do_div(dotclock, 2+clock->n);
> > +       do_div(dotclock, clock->p1);
> > +       do_div(dotclock, clock->p2);
> > +
> > +       return dotclock;
> > +}
> 
> Why is intel_clock (and pineview_clock fwiw) not good enough?

Ignorance. I was just throwing together something to check the values.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


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