Skip to content

Commit

Permalink
i915: Save/restore MCHBAR_RENDER_STANDBY on GM965/GM45
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
keith-packard authored and airlied committed Nov 11, 2008
1 parent 3ad4f59 commit 881ee98
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ typedef struct drm_i915_private {
u32 saveDSPACNTR;
u32 saveDSPBCNTR;
u32 saveDSPARB;
u32 saveRENDERSTANDBY;
u32 savePIPEACONF;
u32 savePIPEBCONF;
u32 savePIPEASRC;
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,9 @@
#define C0DRB3 0x10206
#define C1DRB3 0x10606

/** GM965 GM45 render standby register */
#define MCHBAR_RENDER_STANDBY 0x111B8

/*
* Overlay regs
*/
Expand Down
9 changes: 9 additions & 0 deletions drivers/gpu/drm/i915/i915_suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 881ee98

Please sign in to comment.