summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-11-10 14:39:36 -0800
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-11-10 14:39:36 -0800
commit793cd1dad5e248509a1b09dce7126f236efadb3e (patch)
tree9f875f6190cabfbcb746f0ed02c34201d68ac33f /linux-core
parentc2f80ecf4be09b5b9866d12e3b25cdcf7996b1f4 (diff)
Make sure PLLs are enabled before writing pipe configuration regs
Fix from the X driver. Make sure the PLLs are enabled and not in VGA mode before writing PIPE(A|B)CONF regs to avoid hangs or crashes.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/i915_drv.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index 798491ae..d2bcf4b5 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -431,7 +431,11 @@ static int i915_resume(struct drm_device *dev)
I915_WRITE(DSPASURF, dev_priv->saveDSPASURF);
I915_WRITE(DSPATILEOFF, dev_priv->saveDSPATILEOFF);
}
- I915_WRITE(PIPEACONF, dev_priv->savePIPEACONF);
+
+ if ((dev_priv->saveDPLL_A & DPLL_VCO_ENABLE) &&
+ (dev_priv->saveDPLL_A & DPLL_VGA_MODE_DIS))
+ I915_WRITE(PIPEACONF, dev_priv->savePIPEACONF);
+
i915_restore_palette(dev, PIPE_A);
/* Enable the plane */
I915_WRITE(DSPACNTR, dev_priv->saveDSPACNTR);
@@ -471,7 +475,10 @@ static int i915_resume(struct drm_device *dev)
I915_WRITE(DSPBSURF, dev_priv->saveDSPBSURF);
I915_WRITE(DSPBTILEOFF, dev_priv->saveDSPBTILEOFF);
}
- I915_WRITE(PIPEBCONF, dev_priv->savePIPEBCONF);
+
+ if ((dev_priv->saveDPLL_B & DPLL_VCO_ENABLE) &&
+ (dev_priv->saveDPLL_B & DPLL_VGA_MODE_DIS))
+ I915_WRITE(PIPEBCONF, dev_priv->savePIPEBCONF);
i915_restore_palette(dev, PIPE_A);
/* Enable the plane */
I915_WRITE(DSPBCNTR, dev_priv->saveDSPBCNTR);