drm/i915/eDP: compute the panel power clock divisor from the pch rawclock
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 20 Oct 2012 18:57:43 +0000 (20:57 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Oct 2012 15:54:36 +0000 (17:54 +0200)
commitd2acd215cdb75eb39afadbf31a19bdcf84af7eaf
treed4d20cbf62bdfb4e26697c38c6fe083277da6aba
parent035aa3dec811315a9e3613cd9ab818e584d7c21d
drm/i915/eDP: compute the panel power clock divisor from the pch rawclock

We need this when the bios forgets even to set that bit up. Most seem
to do that, even when they don't set up anything else in the panel
power sequencer.

Note that on IBX the rawclk is variable according to Bspec, but
everyone is using 125MHz. The rawclk is fixed to 125MHz on CPT, but
luckily we still have the same register available. On hsw, different
variants have different clocks, hence we need to check the register.

Since other pieces are driven by the rawclock, too, keep the little
helper in a central place.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h