drm/i915: Add intel_dotclock_calculate()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 13 Sep 2013 12:59:11 +0000 (15:59 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 16 Sep 2013 20:38:51 +0000 (22:38 +0200)
commit6878da05006feb68efe23a6ae010b1a5df32ca5f
tree55953ec781636feac00474c488f8b30229a22510
parent794a79a6b00db14c535c951b03820ea5199c82a3
drm/i915: Add intel_dotclock_calculate()

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>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h