drm/i915/suspend: Flush register writes before busy-waiting.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Chris Wilson 2010-08-14 14:41:22 +01:00 коммит произвёл Eric Anholt
Родитель d5dd96cb28
Коммит 72bcb26909
1 изменённых файлов: 18 добавлений и 9 удалений

Просмотреть файл

@ -395,16 +395,20 @@ static void i915_restore_modeset_reg(struct drm_device *dev)
if (dev_priv->saveDPLL_A & DPLL_VCO_ENABLE) { if (dev_priv->saveDPLL_A & DPLL_VCO_ENABLE) {
I915_WRITE(dpll_a_reg, dev_priv->saveDPLL_A & I915_WRITE(dpll_a_reg, dev_priv->saveDPLL_A &
~DPLL_VCO_ENABLE); ~DPLL_VCO_ENABLE);
DRM_UDELAY(150); POSTING_READ(dpll_a_reg);
udelay(150);
} }
I915_WRITE(fpa0_reg, dev_priv->saveFPA0); I915_WRITE(fpa0_reg, dev_priv->saveFPA0);
I915_WRITE(fpa1_reg, dev_priv->saveFPA1); I915_WRITE(fpa1_reg, dev_priv->saveFPA1);
/* Actually enable it */ /* Actually enable it */
I915_WRITE(dpll_a_reg, dev_priv->saveDPLL_A); I915_WRITE(dpll_a_reg, dev_priv->saveDPLL_A);
DRM_UDELAY(150); POSTING_READ(dpll_a_reg);
if (IS_I965G(dev) && !IS_IRONLAKE(dev)) udelay(150);
if (IS_I965G(dev) && !IS_IRONLAKE(dev)) {
I915_WRITE(DPLL_A_MD, dev_priv->saveDPLL_A_MD); I915_WRITE(DPLL_A_MD, dev_priv->saveDPLL_A_MD);
DRM_UDELAY(150); POSTING_READ(DPLL_A_MD);
}
udelay(150);
/* Restore mode */ /* Restore mode */
I915_WRITE(HTOTAL_A, dev_priv->saveHTOTAL_A); I915_WRITE(HTOTAL_A, dev_priv->saveHTOTAL_A);
@ -460,16 +464,20 @@ static void i915_restore_modeset_reg(struct drm_device *dev)
if (dev_priv->saveDPLL_B & DPLL_VCO_ENABLE) { if (dev_priv->saveDPLL_B & DPLL_VCO_ENABLE) {
I915_WRITE(dpll_b_reg, dev_priv->saveDPLL_B & I915_WRITE(dpll_b_reg, dev_priv->saveDPLL_B &
~DPLL_VCO_ENABLE); ~DPLL_VCO_ENABLE);
DRM_UDELAY(150); POSTING_READ(dpll_b_reg);
udelay(150);
} }
I915_WRITE(fpb0_reg, dev_priv->saveFPB0); I915_WRITE(fpb0_reg, dev_priv->saveFPB0);
I915_WRITE(fpb1_reg, dev_priv->saveFPB1); I915_WRITE(fpb1_reg, dev_priv->saveFPB1);
/* Actually enable it */ /* Actually enable it */
I915_WRITE(dpll_b_reg, dev_priv->saveDPLL_B); I915_WRITE(dpll_b_reg, dev_priv->saveDPLL_B);
DRM_UDELAY(150); POSTING_READ(dpll_b_reg);
if (IS_I965G(dev) && !IS_IRONLAKE(dev)) udelay(150);
if (IS_I965G(dev) && !IS_IRONLAKE(dev)) {
I915_WRITE(DPLL_B_MD, dev_priv->saveDPLL_B_MD); I915_WRITE(DPLL_B_MD, dev_priv->saveDPLL_B_MD);
DRM_UDELAY(150); POSTING_READ(DPLL_B_MD);
}
udelay(150);
/* Restore mode */ /* Restore mode */
I915_WRITE(HTOTAL_B, dev_priv->saveHTOTAL_B); I915_WRITE(HTOTAL_B, dev_priv->saveHTOTAL_B);
@ -730,7 +738,8 @@ void i915_restore_display(struct drm_device *dev)
I915_WRITE(VGA0, dev_priv->saveVGA0); I915_WRITE(VGA0, dev_priv->saveVGA0);
I915_WRITE(VGA1, dev_priv->saveVGA1); I915_WRITE(VGA1, dev_priv->saveVGA1);
I915_WRITE(VGA_PD, dev_priv->saveVGA_PD); I915_WRITE(VGA_PD, dev_priv->saveVGA_PD);
DRM_UDELAY(150); POSTING_READ(VGA_PD);
udelay(150);
i915_restore_vga(dev); i915_restore_vga(dev);
} }