]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915/vlv: move CRI refclk enable into __vlv_set_power_well
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 23 May 2014 20:16:42 +0000 (13:16 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 May 2014 20:18:31 +0000 (22:18 +0200)
This needs to be done before we power back on the CMN_BC well so the PHY
can calibrate properly.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c

index 153888eec25d596de57ac97e90aea611920baeca..186077176287752438fa51322b1ba3b0b425806f 100644 (file)
@@ -1484,14 +1484,6 @@ static void intel_reset_dpio(struct drm_device *dev)
        if (!IS_VALLEYVIEW(dev))
                return;
 
-       /*
-        * Enable the CRI clock source so we can get at the display and the
-        * reference clock for VGA hotplug / manual detection.
-        */
-       I915_WRITE(DPLL(PIPE_B), I915_READ(DPLL(PIPE_B)) |
-                  DPLL_REFA_CLK_ENABLE_VLV |
-                  DPLL_INTEGRATED_CRI_CLK_VLV);
-
        if (IS_CHERRYVIEW(dev)) {
                enum dpio_phy phy;
                u32 val;
index d14bd6f0fc444dcb2f840e31c5feaf57af4f0411..558e3eede26238d09d8974afdd0e2d9865a5d70c 100644 (file)
@@ -5908,6 +5908,17 @@ void __vlv_set_power_well(struct drm_i915_private *dev_priv,
        u32 state;
        u32 ctrl;
 
+       if (power_well_id == PUNIT_POWER_WELL_DPIO_CMN_BC && enable) {
+               /*
+                * Enable the CRI clock source so we can get at the display
+                * and the reference clock for VGA hotplug / manual detection.
+                */
+               I915_WRITE(DPLL(PIPE_B), I915_READ(DPLL(PIPE_B)) |
+                          DPLL_REFA_CLK_ENABLE_VLV |
+                          DPLL_INTEGRATED_CRI_CLK_VLV);
+               udelay(1); /* >10ns for cmnreset, >0ns for sidereset */
+       }
+
        mask = PUNIT_PWRGT_MASK(power_well_id);
        state = enable ? PUNIT_PWRGT_PWR_ON(power_well_id) :
                         PUNIT_PWRGT_PWR_GATE(power_well_id);