diff options
author | Peng Li <peng.li@intel.com> | 2008-11-17 23:39:02 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-11-26 00:47:25 -0500 |
commit | 461cba2d294fe83297edf8a6556912812903dce1 (patch) | |
tree | 19c7cd768bbbc5a35b124dc856e109a8b2ddff5f /drivers/gpu | |
parent | 52440211dcdc52c0b757f8b34d122e11b12cdd50 (diff) |
drm/i915: Save/restore HWS_PGA on suspend/resume
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_suspend.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index b24d522f490c..0a4f39b9a0ec 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -150,6 +150,7 @@ typedef struct drm_i915_private { | |||
150 | u32 saveDSPBCNTR; | 150 | u32 saveDSPBCNTR; |
151 | u32 saveDSPARB; | 151 | u32 saveDSPARB; |
152 | u32 saveRENDERSTANDBY; | 152 | u32 saveRENDERSTANDBY; |
153 | u32 saveHWS; | ||
153 | u32 savePIPEACONF; | 154 | u32 savePIPEACONF; |
154 | u32 savePIPEBCONF; | 155 | u32 savePIPEBCONF; |
155 | u32 savePIPEASRC; | 156 | u32 savePIPEASRC; |
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 5ddc6e595c0c..5d84027ee8f3 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c | |||
@@ -244,6 +244,9 @@ int i915_save_state(struct drm_device *dev) | |||
244 | if (IS_I965G(dev) && IS_MOBILE(dev)) | 244 | if (IS_I965G(dev) && IS_MOBILE(dev)) |
245 | dev_priv->saveRENDERSTANDBY = I915_READ(MCHBAR_RENDER_STANDBY); | 245 | dev_priv->saveRENDERSTANDBY = I915_READ(MCHBAR_RENDER_STANDBY); |
246 | 246 | ||
247 | /* Hardware status page */ | ||
248 | dev_priv->saveHWS = I915_READ(HWS_PGA); | ||
249 | |||
247 | /* Display arbitration control */ | 250 | /* Display arbitration control */ |
248 | dev_priv->saveDSPARB = I915_READ(DSPARB); | 251 | dev_priv->saveDSPARB = I915_READ(DSPARB); |
249 | 252 | ||
@@ -373,6 +376,9 @@ int i915_restore_state(struct drm_device *dev) | |||
373 | if (IS_I965G(dev) && IS_MOBILE(dev)) | 376 | if (IS_I965G(dev) && IS_MOBILE(dev)) |
374 | I915_WRITE(MCHBAR_RENDER_STANDBY, dev_priv->saveRENDERSTANDBY); | 377 | I915_WRITE(MCHBAR_RENDER_STANDBY, dev_priv->saveRENDERSTANDBY); |
375 | 378 | ||
379 | /* Hardware status page */ | ||
380 | I915_WRITE(HWS_PGA, dev_priv->saveHWS); | ||
381 | |||
376 | /* Display arbitration */ | 382 | /* Display arbitration */ |
377 | I915_WRITE(DSPARB, dev_priv->saveDSPARB); | 383 | I915_WRITE(DSPARB, dev_priv->saveDSPARB); |
378 | 384 | ||