drm/i915: Use skl_cdclk_decimal() on bxt
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 11 May 2016 19:44:45 +0000 (22:44 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 13 May 2016 18:31:17 +0000 (21:31 +0300)
commit92891e45c313e22095c90eb36b283a3b39e90bd4
tree3146eb52e814d96dc616cb4007c5caaf0c13aaa1
parent4e5ca60fd35a2f042902e8047c1273aa79409977
drm/i915: Use skl_cdclk_decimal() on bxt

Both SKL and BXT need to fill in the "decimal" cdclk frequency into
the CDCLK_CTL register. SKL uses a small helper to do the kHz->"decimal"
conversion, whereas BXT has it open-coded. Use the helper on BXT too.

While at it, change it to round to closest rather than down. It doesn't
actually matter with the frequencies we have to deal with, but it seems
like the right thing to do.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1462995892-32416-7-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_display.c