Skip to content

Commit

Permalink
drm/i915: Save/restore HWS_PGA on suspend/resume
Browse files Browse the repository at this point in the history
It fixes suspend/resume failure of xf86-video-intel dri2
branch. As dri2 branch doesn't call I830DRIResume() to restore
hardware status page anymore, we need to preserve
this register across suspend/resume.

Signed-off-by: Peng Li <peng.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Peng Li authored and Dave Airlie committed Nov 26, 2008
1 parent 5244021 commit 461cba2
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -150,6 +150,7 @@ typedef struct drm_i915_private {
u32 saveDSPBCNTR;
u32 saveDSPARB;
u32 saveRENDERSTANDBY;
u32 saveHWS;
u32 savePIPEACONF;
u32 savePIPEBCONF;
u32 savePIPEASRC;
Expand Down
6 changes: 6 additions & 0 deletions drivers/gpu/drm/i915/i915_suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ int i915_save_state(struct drm_device *dev)
if (IS_I965G(dev) && IS_MOBILE(dev))
dev_priv->saveRENDERSTANDBY = I915_READ(MCHBAR_RENDER_STANDBY);

/* Hardware status page */
dev_priv->saveHWS = I915_READ(HWS_PGA);

/* Display arbitration control */
dev_priv->saveDSPARB = I915_READ(DSPARB);

Expand Down Expand Up @@ -373,6 +376,9 @@ int i915_restore_state(struct drm_device *dev)
if (IS_I965G(dev) && IS_MOBILE(dev))
I915_WRITE(MCHBAR_RENDER_STANDBY, dev_priv->saveRENDERSTANDBY);

/* Hardware status page */
I915_WRITE(HWS_PGA, dev_priv->saveHWS);

/* Display arbitration */
I915_WRITE(DSPARB, dev_priv->saveDSPARB);

Expand Down

0 comments on commit 461cba2

Please sign in to comment.