From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH v2 10/25] drm/i915: gen2: move error capture of IER to its correct place Date: Wed, 16 Apr 2014 15:57:10 +0300 Message-ID: <1397653030.4215.14.camel@intelbox> References: <1397496286-29649-1-git-send-email-imre.deak@intel.com> <1397496286-29649-11-git-send-email-imre.deak@intel.com> <20140416122232.GE18465@intel.com> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1633248335==" Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EB076E38E for ; Wed, 16 Apr 2014 05:57:12 -0700 (PDT) In-Reply-To: <20140416122232.GE18465@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1633248335== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-A5DB9WCqBnuNs1p2cJGV" --=-A5DB9WCqBnuNs1p2cJGV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2014-04-16 at 15:22 +0300, Ville Syrj=C3=A4l=C3=A4 wrote: > On Mon, Apr 14, 2014 at 08:24:31PM +0300, Imre Deak wrote: > > While checking the error capture path I noticed that this register is > > read twice for GEN2, so fix this and also move the read where it's done > > for other platforms. > >=20 > > Signed-off-by: Imre Deak > > --- > > drivers/gpu/drm/i915/i915_gpu_error.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i9= 15/i915_gpu_error.c > > index 4865ade..ba79b59 100644 > > --- a/drivers/gpu/drm/i915/i915_gpu_error.c > > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c > > @@ -1053,9 +1053,6 @@ static void i915_capture_reg_state(struct drm_i91= 5_private *dev_priv, > > error->gfx_mode =3D I915_READ(GFX_MODE); > > } > > =20 > > - if (IS_GEN2(dev)) > > - error->ier =3D I915_READ16(IER); > > - > > /* 2: Registers which belong to multiple generations */ > > if (INTEL_INFO(dev)->gen >=3D 7) > > error->forcewake =3D I915_READ(FORCEWAKE_MT); > > @@ -1079,7 +1076,10 @@ static void i915_capture_reg_state(struct drm_i9= 15_private *dev_priv, > > if (HAS_PCH_SPLIT(dev)) > > error->ier =3D I915_READ(DEIER) | I915_READ(GTIER); > > else { > > - error->ier =3D I915_READ(IER); > > + if (IS_GEN2(dev)) > > + error->ier =3D I915_READ16(IER); > > + else > > + error->ier =3D I915_READ(IER); > > for_each_pipe(pipe) > > error->pipestat[pipe] =3D I915_READ(PIPESTAT(pipe)); > > } >=20 > The IER handling seems fairly bogus all around. On VLV and PCH platforms > we smash both the display and GT IER into the same u32. So probably no > one can make any sense of the result. >=20 > Also I don't know why we try to dump only these two interrupt registers > but not the others. >=20 > So seems like there's more work that needs to be done here. Right, haven't noticed those. This patch could be still applied as it's just one step towards fixing the other issues you mentioned, but I think it should be anyway kept separate (being just a cleanup patch). --Imre --=-A5DB9WCqBnuNs1p2cJGV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQEcBAABAgAGBQJTTn4mAAoJEORIIAnNuWDFIF0H/2fDHKSKnb4uIsSRTK6wuv9v 07JuO4+xTY2ZknkRssqICMkdnJJQZGENH0tq6rAg8gzVt8VIidcS13+ymVDLHbGF uMNyabuyiQRO193sBu/VXClBcdRgR1t5c3MHnPHoi06/KcU682guoDjxig433K1o 1v3Dgk7lj+YQs4Azy57iKrGyDLatdAMWV66j57am/JkoFLb/5OvLPsq/5w852gBv UeK29/imKg91LbdwnVNKLi6v8hXuJBYbByTnZRH1TonEVcVEgZMuWSnH98yttKfp DvTWvdqQJEJu7+aEExO9ZaPS3l97zaXOXHay2AXBm9jM9Zk6s8eTTIC8pe+URh8= =ZJD3 -----END PGP SIGNATURE----- --=-A5DB9WCqBnuNs1p2cJGV-- --===============1633248335== 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 --===============1633248335==--