From: Zhenyu Wang Subject: Re: [PATCH 3/8] drm/i915: save/restore DSPARB only for chip before gen4 Date: Tue, 22 Mar 2011 09:44:07 +0800 Message-ID: <20110322014406.GK27541@zhen-devel.sh.intel.com> References: <1300699639-23996-1-git-send-email-zhenyuw@linux.intel.com> <1300699639-23996-4-git-send-email-zhenyuw@linux.intel.com> <20110321103954.26662958@jbarnes-desktop> Reply-To: Zhenyu Wang Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0278976343==" Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 98C699E747 for ; Mon, 21 Mar 2011 18:44:08 -0700 (PDT) In-Reply-To: <20110321103954.26662958@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0278976343== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="STPqjqpCrtky8aYs" Content-Disposition: inline --STPqjqpCrtky8aYs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011.03.21 10:39:54 -0700, Jesse Barnes wrote: > On Mon, 21 Mar 2011 17:27:14 +0800 > Zhenyu Wang wrote: >=20 > > Signed-off-by: Zhenyu Wang > > --- > > drivers/gpu/drm/i915/i915_suspend.c | 12 ++++-------- > > 1 files changed, 4 insertions(+), 8 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915= /i915_suspend.c > > index 422981b..7f00f8b 100644 > > --- a/drivers/gpu/drm/i915/i915_suspend.c > > +++ b/drivers/gpu/drm/i915/i915_suspend.c > > @@ -603,7 +603,8 @@ void i915_save_display(struct drm_device *dev) > > struct drm_i915_private *dev_priv =3D dev->dev_private; > > =20 > > /* Display arbitration control */ > > - dev_priv->saveDSPARB =3D I915_READ(DSPARB); > > + if (dev_priv->info->gen < 4) > > + dev_priv->saveDSPARB =3D I915_READ(DSPARB); > > =20 > > /* This is only meaningful in non-KMS mode */ > > /* Don't save them in KMS mode */ > > @@ -695,7 +696,8 @@ void i915_restore_display(struct drm_device *dev) > > struct drm_i915_private *dev_priv =3D dev->dev_private; > > =20 > > /* Display arbitration */ > > - I915_WRITE(DSPARB, dev_priv->saveDSPARB); > > + if (dev_priv->info->gen < 4) > > + I915_WRITE(DSPARB, dev_priv->saveDSPARB); >=20 > Was it Cantiga that started doing automatic FIFO sizing for us? > Checking the docs... Yeah, only Bearlake-C (G33?) and Cantiga do this > automatically. So a blanket gen4 check probably isn't right. >=20 I just saw we only use it for gen < 4 chips, also including G33 (gen=3D3)... > > =20 > > /* Display port ratios (must be done before clock is set) */ > > if (SUPPORTS_INTEGRATED_DP(dev)) { > > @@ -795,9 +797,6 @@ int i915_save_state(struct drm_device *dev) > > struct drm_i915_private *dev_priv =3D dev->dev_private; > > int i; > > =20 > > - /* Hardware status page */ > > - dev_priv->saveHWS =3D I915_READ(HWS_PGA); > > - > > i915_save_display(dev); > > =20 > > /* Interrupt state */ > > @@ -842,9 +841,6 @@ int i915_restore_state(struct drm_device *dev) > > struct drm_i915_private *dev_priv =3D dev->dev_private; > > int i; > > =20 > > - /* Hardware status page */ > > - I915_WRITE(HWS_PGA, dev_priv->saveHWS); > > - > > i915_restore_display(dev); > > =20 > > /* Interrupt state */ >=20 >=20 > These hunks are unrelated to DSPARB; assuming we actually want to do > this it should be a separate patch. Based on earlier reports, it > sounds like we're not properly idling across suspend/resume, in that > we're trying to execute commands at resume before setting up the HWS > again. >=20 sorry, it's already in Chris's tree, but not in Linus's yet. --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --STPqjqpCrtky8aYs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk2H/uYACgkQsQQaM014GCcVmwCfarxnBNeziy1N8/KsL9mSxEB7 mtIAnRYCtUvPUQo6lH7NhKXOQ87eqU79 =8r9D -----END PGP SIGNATURE----- --STPqjqpCrtky8aYs-- --===============0278976343== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0278976343==--