Re: [PATCH v2] drm/i915: Add intel_dotclock_calculate()

Ville Syrjälä
2013-09-17T08:16:18Z

On Mon, Sep 16, 2013 at 10:41:38PM +0200, Daniel Vetter wrote:
> On Mon, Sep 16, 2013 at 02:14:47PM +0300, Jani Nikula wrote:
> > On Fri, 13 Sep 2013, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > Extract the code to calculate the dotclock from the link clock and M/N
> > > values into a new function from ironlake_crtc_clock_get().
> > >
> > > The new function can be used to calculate the dotclock for both FDI and
> > > DP cases.
> > >
> > > Also simplify the code a bit along the way.
> > >
> > > v2: Don't forget about non-pch encoders in ironlake_crtc_clock_get()
> > >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> >
> > > ---
> > > drivers/gpu/drm/i915/intel_display.c | 43 ++++++++++++++++++------------------
> > > drivers/gpu/drm/i915/intel_drv.h | 2 ++
> > > 2 files changed, 24 insertions(+), 21 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > > index c0ee41c..13dea9b 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -7405,16 +7405,9 @@ static void i9xx_crtc_clock_get(struct intel_crtc *crtc,
> > > pipe_config->adjusted_mode.clock = clock.dot;
> > > }
> > >
> > > -static void ironlake_crtc_clock_get(struct intel_crtc *crtc,
> > > - struct intel_crtc_config *pipe_config)
> > > +int intel_dotclock_calculate(int link_freq,
> > > + const struct intel_link_m_n *m_n)
>
> intel_dotclock_calculate is an awfully generic name for something which
> computes the dotclock for an fdi/dp link ... Maybe intel_dotclock_from_m_n
> instead?
>
> Patch merged since I don't want to block this any longer (and maybe it
> makes more sense in the end, haven't checked).

Probably doesn't. It should be obvious by now that I suck at naming.

--
Ville Syrjälä
Intel OTC