drm/i915: Enable DPLL VGA mode before P1/P2 divider write
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / i915 / intel_display.c
index bdfac53dd9452b473c5d58c494d72275295caf63..96e6c41783df400b01e9d7b51b8952e0f1b708b2 100644 (file)
@@ -1724,6 +1724,13 @@ static void i9xx_enable_pll(struct intel_crtc *crtc)
                           I915_READ(DPLL(!crtc->pipe)) | DPLL_DVO_2X_MODE);
        }
 
+       /*
+        * Apparently we need to have VGA mode enabled prior to changing
+        * the P1/P2 dividers. Otherwise the DPLL will keep using the old
+        * dividers, even though the register value does change.
+        */
+       I915_WRITE(reg, 0);
+
        I915_WRITE(reg, dpll);
 
        /* Wait for the clocks to stabilize. */