[Intel-gfx] [PATCH 1/2] drm/i915: Only save/restore FBC on Mobile platform
ykzhao
yakui.zhao at intel.com
Thu Mar 18 02:08:32 CET 2010
On Thu, 2010-03-18 at 05:01 +0800, Eric Anholt wrote:
> On Mon, 15 Mar 2010 14:37:57 +0800, Zhenyu Wang <zhenyuw at linux.intel.com> wrote:
> > From: Zhao Yakui <yakui.zhao at intel.com>
> >
> > Signe-off-by: Zhao Yakui <yakui.zhao at intel.com>
> > Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_suspend.c | 40 +++++++++++++++++++---------------
> > 1 files changed, 22 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
> > index ac0d1a7..45f25c2 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)
> > }
> > /* FIXME: save TV & SDVO state */
> >
> > - /* FBC state */
> > - if (IS_GM45(dev)) {
> > - dev_priv->saveDPFC_CB_BASE = I915_READ(DPFC_CB_BASE);
> > - } else {
> > - dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE);
> > - dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE);
> > - dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2);
> > - dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL);
> > + /* Only save FBC register on Mobile platform */
> > + if (IS_MOBILE(dev)) {
> > + if (IS_GM45(dev)) {
> > + dev_priv->saveDPFC_CB_BASE = I915_READ(DPFC_CB_BASE);
> > + } else {
> > + dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE);
> > + dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE);
> > + dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2);
> > + dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL);
> > + }
> > }
>
> Surely this should be I915_HAS_FBC(dev) not IS_MOBILE(dev).
Thanks for pointing out the issue.
IS_HAS_FBC(dev) is more precise than IS_MOBILE(dev). The FBC is not
supported on some mobile platforms.
Thanks.
More information about the Intel-gfx
mailing list