From: Eric Anholt Subject: Re: [PATCH 02/11] drm/i915: track tlb invalidate GFX_MODE state Date: Wed, 15 Feb 2012 11:36:10 -0800 Message-ID: <87ehtvevo5.fsf@eliezer.anholt.net> References: <1329253758-24943-1-git-send-email-ben@bwidawsk.net> <1329253758-24943-3-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2000059341==" Return-path: In-Reply-To: <1329253758-24943-3-git-send-email-ben@bwidawsk.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: intel-gfx@lists.freedesktop.org Cc: Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org --===============2000059341== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable 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/i9= 15/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_buffer= *ring) > return ret; > } >=20=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/i9= 15/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=20 > + /** > + * Do an explicit TLB flush before MI_SET_CONTEXT > + */ > + bool itlb_before_ctx_switch; > + > void *private; > }; 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. (What I was trying to figure out was whether this was needed for gen7. It looks like it is not required). --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk88CSoACgkQHUdvYGzw6vesqACcDnTyCxLpjH8MPRA43hxsAHtt 0X0AnApjSwtnMzp62/nr3UwtbtX9Py1V =ITrI -----END PGP SIGNATURE----- --=-=-=-- --===============2000059341== 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 --===============2000059341==--