i915: Save/restore MCHBAR_RENDER_STANDBY on GM965/GM45
authorKeith Packard <keithp@keithp.com>
Mon, 3 Nov 2008 07:08:44 +0000 (23:08 -0800)
committerDave Airlie <airlied@linux.ie>
Tue, 11 Nov 2008 07:42:19 +0000 (17:42 +1000)
This register is set by the 2D driver to prevent lockups, and so it needs to
be preserved across suspend/resume too. This makes my X200s work.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/i915_suspend.c

index 572dcd0..be56b0b 100644 (file)
@@ -157,6 +157,7 @@ typedef struct drm_i915_private {
        u32 saveDSPACNTR;
        u32 saveDSPBCNTR;
        u32 saveDSPARB;
+       u32 saveRENDERSTANDBY;
        u32 savePIPEACONF;
        u32 savePIPEBCONF;
        u32 savePIPEASRC;
index 5c2d9f2..0e476eb 100644 (file)
 #define C0DRB3                 0x10206
 #define C1DRB3                 0x10606
 
+/** GM965 GM45 render standby register */
+#define MCHBAR_RENDER_STANDBY  0x111B8
+
 /*
  * Overlay regs
  */
index 603fe74..5ddc6e5 100644 (file)
@@ -240,6 +240,10 @@ int i915_save_state(struct drm_device *dev)
 
        pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB);
 
+       /* Render Standby */
+       if (IS_I965G(dev) && IS_MOBILE(dev))
+               dev_priv->saveRENDERSTANDBY = I915_READ(MCHBAR_RENDER_STANDBY);
+
        /* Display arbitration control */
        dev_priv->saveDSPARB = I915_READ(DSPARB);
 
@@ -365,6 +369,11 @@ int i915_restore_state(struct drm_device *dev)
 
        pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB);
 
+       /* Render Standby */
+       if (IS_I965G(dev) && IS_MOBILE(dev))
+               I915_WRITE(MCHBAR_RENDER_STANDBY, dev_priv->saveRENDERSTANDBY);
+
+       /* Display arbitration */
        I915_WRITE(DSPARB, dev_priv->saveDSPARB);
 
        /* Pipe & plane A info */