diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2010-03-19 05:05:10 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-04-12 12:25:54 -0400 |
commit | a2c459ee9aa52a659611ec1f1b43bfde49017b23 (patch) | |
tree | 4213a9ef6f58fb782fd732a2c5b36ac43de4ed2d /drivers/gpu/drm/i915 | |
parent | 8a1837cef7762413c29432b782607bd6c1898d4e (diff) |
drm/i915: Only save/restore FBC on the platform that supports FBC
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_suspend.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index ac0d1a73ac22..60a5800fba6e 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c | |||
@@ -600,14 +600,16 @@ void i915_save_display(struct drm_device *dev) | |||
600 | } | 600 | } |
601 | /* FIXME: save TV & SDVO state */ | 601 | /* FIXME: save TV & SDVO state */ |
602 | 602 | ||
603 | /* FBC state */ | 603 | /* Only save FBC state on the platform that supports FBC */ |
604 | if (IS_GM45(dev)) { | 604 | if (I915_HAS_FBC(dev)) { |
605 | dev_priv->saveDPFC_CB_BASE = I915_READ(DPFC_CB_BASE); | 605 | if (IS_GM45(dev)) { |
606 | } else { | 606 | dev_priv->saveDPFC_CB_BASE = I915_READ(DPFC_CB_BASE); |
607 | dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE); | 607 | } else { |
608 | dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE); | 608 | dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE); |
609 | dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2); | 609 | dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE); |
610 | dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL); | 610 | dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2); |
611 | dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL); | ||
612 | } | ||
611 | } | 613 | } |
612 | 614 | ||
613 | /* VGA state */ | 615 | /* VGA state */ |
@@ -702,18 +704,19 @@ void i915_restore_display(struct drm_device *dev) | |||
702 | } | 704 | } |
703 | /* FIXME: restore TV & SDVO state */ | 705 | /* FIXME: restore TV & SDVO state */ |
704 | 706 | ||
705 | /* FBC info */ | 707 | /* only restore FBC info on the platform that supports FBC*/ |
706 | if (IS_GM45(dev)) { | 708 | if (I915_HAS_FBC(dev)) { |
707 | g4x_disable_fbc(dev); | 709 | if (IS_GM45(dev)) { |
708 | I915_WRITE(DPFC_CB_BASE, dev_priv->saveDPFC_CB_BASE); | 710 | g4x_disable_fbc(dev); |
709 | } else { | 711 | I915_WRITE(DPFC_CB_BASE, dev_priv->saveDPFC_CB_BASE); |
710 | i8xx_disable_fbc(dev); | 712 | } else { |
711 | I915_WRITE(FBC_CFB_BASE, dev_priv->saveFBC_CFB_BASE); | 713 | i8xx_disable_fbc(dev); |
712 | I915_WRITE(FBC_LL_BASE, dev_priv->saveFBC_LL_BASE); | 714 | I915_WRITE(FBC_CFB_BASE, dev_priv->saveFBC_CFB_BASE); |
713 | I915_WRITE(FBC_CONTROL2, dev_priv->saveFBC_CONTROL2); | 715 | I915_WRITE(FBC_LL_BASE, dev_priv->saveFBC_LL_BASE); |
714 | I915_WRITE(FBC_CONTROL, dev_priv->saveFBC_CONTROL); | 716 | I915_WRITE(FBC_CONTROL2, dev_priv->saveFBC_CONTROL2); |
717 | I915_WRITE(FBC_CONTROL, dev_priv->saveFBC_CONTROL); | ||
718 | } | ||
715 | } | 719 | } |
716 | |||
717 | /* VGA state */ | 720 | /* VGA state */ |
718 | if (IS_IRONLAKE(dev)) | 721 | if (IS_IRONLAKE(dev)) |
719 | I915_WRITE(CPU_VGACNTRL, dev_priv->saveVGACNTRL); | 722 | I915_WRITE(CPU_VGACNTRL, dev_priv->saveVGACNTRL); |