From: Ben Widawsky Subject: Re: [PATCH 02/11] drm/i915: track tlb invalidate GFX_MODE state Date: Mon, 5 Mar 2012 19:19:19 +0100 Message-ID: <20120305191919.2ec6498a@bwidawsk.net> References: <1329253758-24943-1-git-send-email-ben@bwidawsk.net> <1329253758-24943-3-git-send-email-ben@bwidawsk.net> <87ehtvevo5.fsf@eliezer.anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1708814906==" Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id D604FA02E8 for ; Mon, 5 Mar 2012 10:20:29 -0800 (PST) In-Reply-To: <87ehtvevo5.fsf@eliezer.anholt.net> 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: Eric Anholt Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1708814906== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/zVa7XadoiUbP7h06WJs.f2D"; protocol="application/pgp-signature" --Sig_/zVa7XadoiUbP7h06WJs.f2D Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 15 Feb 2012 11:36:10 -0800 Eric Anholt wrote: > On Tue, 14 Feb 2012 22:09:09 +0100, Ben Widawsky wrote: > > This is needed for an upcoming workaround. > >=20 > > Signed-off-by: Ben Widawsky > > --- > > drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++ > > drivers/gpu/drm/i915/intel_ringbuffer.h | 5 +++++ > > 2 files changed, 9 insertions(+), 0 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/= i915/intel_ringbuffer.c > > index 4956f1b..411a0e5 100644 > > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c > > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c > > @@ -412,6 +412,10 @@ static int init_render_ring(struct intel_ring_buff= er *ring) > > return ret; > > } > > =20 > > + if (INTEL_INFO(dev)->gen =3D=3D 6) > > + ring->itlb_before_ctx_switch =3D > > + !!(I915_READ(GFX_MODE) & GFX_TLB_INVALIDATE_ALWAYS); > > + > > if (INTEL_INFO(dev)->gen >=3D 6) { > > I915_WRITE(INSTPM, > > INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); > > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/= i915/intel_ringbuffer.h > > index c8b9cc0..fad4251 100644 > > --- a/drivers/gpu/drm/i915/intel_ringbuffer.h > > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h > > @@ -110,6 +110,11 @@ struct intel_ring_buffer { > > wait_queue_head_t irq_queue; > > drm_local_map_t map; > > =20 > > + /** > > + * Do an explicit TLB flush before MI_SET_CONTEXT > > + */ > > + bool itlb_before_ctx_switch; > > + > > void *private; > > }; >=20 > I really wanted to see the consumer of this when trying to review this > code. They weren't logically separate -- this is to implement a quoted > piece of spec in the later commit. >=20 > (What I was trying to figure out was whether this was needed for gen7. > It looks like it is not required). I'm happy to move this around to whatever order/split you'd like. Could you please recommend how you would like me to break it up? Daniel has a later email which I'm planning to try to follow. --Sig_/zVa7XadoiUbP7h06WJs.f2D Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJPVQOnAAoJEL9nTIiJEj0pBsgIAIDXY2Tu1B+1b0XYrkWp6ueh Vp/B/mOlqL5Sb4TvPomEGiQSRjgr3gIXq4qSmOYwgABO11AkSt5B4QVhAt4EtFi3 VgpY6s/ueIJNK8Gb1GZJcmAGv9aZK0XmfDEpl8PRPRODtdM4qLaz4CQjy80syGK8 BwC5nc+L6xG9b8rQWD9qn8ed3T+Szd3NTrfMGYuB9Isx9UW/AyT1ZFj6fd7PIuQY eDaDMSfCVX28tlJWDiZ64r9qyPYVnayAO2P6WKcGQXoPGPC1ZPUFojfP3SdWmjzQ fA9EQA/fiQRads43SNte7laG21mMH26L0WtDCdxlFgh4whlfCkbJlSvDh3NMTIA= =vQxt -----END PGP SIGNATURE----- --Sig_/zVa7XadoiUbP7h06WJs.f2D-- --===============1708814906== 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 --===============1708814906==--