diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-10-05 16:47:26 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-10-13 13:36:20 -0400 |
commit | 06027f9111b9f3244ddc40752428f7847b0b867e (patch) | |
tree | a1b603cf377c092216e35560a2aa143093003582 | |
parent | a3e17eb8f4080a79738a938abe718be255247a44 (diff) |
drm/i915: Save and restore the GM45 FBC regs on suspend and resume.
This hasn't fixed the regressions we were testing against, but clearly
should be required.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_suspend.c | 26 |
2 files changed, 19 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 17be01e351b3..1254c4b80e30 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -342,6 +342,7 @@ typedef struct drm_i915_private { | |||
342 | u32 savePFIT_CONTROL; | 342 | u32 savePFIT_CONTROL; |
343 | u32 save_palette_a[256]; | 343 | u32 save_palette_a[256]; |
344 | u32 save_palette_b[256]; | 344 | u32 save_palette_b[256]; |
345 | u32 saveDPFC_CB_BASE; | ||
345 | u32 saveFBC_CFB_BASE; | 346 | u32 saveFBC_CFB_BASE; |
346 | u32 saveFBC_LL_BASE; | 347 | u32 saveFBC_LL_BASE; |
347 | u32 saveFBC_CONTROL; | 348 | u32 saveFBC_CONTROL; |
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index bd6d8d91ca9f..660c5f36424b 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c | |||
@@ -437,10 +437,14 @@ void i915_save_display(struct drm_device *dev) | |||
437 | /* FIXME: save TV & SDVO state */ | 437 | /* FIXME: save TV & SDVO state */ |
438 | 438 | ||
439 | /* FBC state */ | 439 | /* FBC state */ |
440 | dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE); | 440 | if (IS_GM45(dev)) { |
441 | dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE); | 441 | dev_priv->saveDPFC_CB_BASE = I915_READ(DPFC_CB_BASE); |
442 | dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2); | 442 | } else { |
443 | dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL); | 443 | dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE); |
444 | dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE); | ||
445 | dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2); | ||
446 | dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL); | ||
447 | } | ||
444 | 448 | ||
445 | /* VGA state */ | 449 | /* VGA state */ |
446 | dev_priv->saveVGA0 = I915_READ(VGA0); | 450 | dev_priv->saveVGA0 = I915_READ(VGA0); |
@@ -511,10 +515,16 @@ void i915_restore_display(struct drm_device *dev) | |||
511 | /* FIXME: restore TV & SDVO state */ | 515 | /* FIXME: restore TV & SDVO state */ |
512 | 516 | ||
513 | /* FBC info */ | 517 | /* FBC info */ |
514 | I915_WRITE(FBC_CFB_BASE, dev_priv->saveFBC_CFB_BASE); | 518 | if (IS_GM45(dev)) { |
515 | I915_WRITE(FBC_LL_BASE, dev_priv->saveFBC_LL_BASE); | 519 | g4x_disable_fbc(dev); |
516 | I915_WRITE(FBC_CONTROL2, dev_priv->saveFBC_CONTROL2); | 520 | I915_WRITE(DPFC_CB_BASE, dev_priv->saveDPFC_CB_BASE); |
517 | I915_WRITE(FBC_CONTROL, dev_priv->saveFBC_CONTROL); | 521 | } else { |
522 | i8xx_disable_fbc(dev); | ||
523 | I915_WRITE(FBC_CFB_BASE, dev_priv->saveFBC_CFB_BASE); | ||
524 | I915_WRITE(FBC_LL_BASE, dev_priv->saveFBC_LL_BASE); | ||
525 | I915_WRITE(FBC_CONTROL2, dev_priv->saveFBC_CONTROL2); | ||
526 | I915_WRITE(FBC_CONTROL, dev_priv->saveFBC_CONTROL); | ||
527 | } | ||
518 | 528 | ||
519 | /* VGA state */ | 529 | /* VGA state */ |
520 | I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL); | 530 | I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL); |