]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/intel_display.c
drm/i915: Make the LPT iclkip 20MHz case more generic
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 17 Feb 2016 19:41:11 +0000 (21:41 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 1 Mar 2016 11:04:46 +0000 (13:04 +0200)
commit64b46a06313634cf9ce5808ebd63dc82573be34c
tree0196e807b61c552c5ce093dd401be56be8ecc3aa
parent21a727b365f8617e9f57229f55c9712b13ab38a6
drm/i915: Make the LPT iclkip 20MHz case more generic

The reason for spcial casing 20MHz in the iclkip calculations is that
it would overflow the 7 bit divisor value. Let's rewrite the special
case to check for just that, and bump up auxdiv when needed. This makes
the code work for freqeuencies close to but not exactly 20MHz. The real
lower limit for auxdiv=0 is actually:
172800000/(0x7f+2)*64)=~20930 kHz, and below that we must resort to
auxdiv=1.

Actually this is all very theoretical since we limit the dotclock to
min 25MHz with CRT on all platforms. 25Mhz is actually the documented
limit in Bspec, so it seems we ought to never need to worry about the
auxdiv=1 case. But no harm in having it.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1455738073-14502-5-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/intel_display.c