[Intel-gfx] [PATCH 1/2] drm/i915: Only save/restore FBC on Mobile platform

Eric Anholt eric at anholt.net
Wed Mar 17 22:01:22 CET 2010


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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100317/8030caa3/attachment.sig>


More information about the Intel-gfx mailing list