On Wed, 15 Feb 2012 11:36:10 -0800 Eric Anholt <eric at anholt.net> wrote: > On Tue, 14 Feb 2012 22:09:09 +0100, Ben Widawsky <ben at bwidawsk.net> wrote: > > This is needed for an upcoming workaround. > > > > Signed-off-by: Ben Widawsky <ben at bwidawsk.net> > > --- > > drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++ > > drivers/gpu/drm/i915/intel_ringbuffer.h | 5 +++++ > > 2 files changed, 9 insertions(+), 0 deletions(-) > > > > 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_buffer *ring) > > return ret; > > } > > > > + if (INTEL_INFO(dev)->gen == 6) > > + ring->itlb_before_ctx_switch = > > + !!(I915_READ(GFX_MODE) & GFX_TLB_INVALIDATE_ALWAYS); > > + > > if (INTEL_INFO(dev)->gen >= 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; > > > > + /** > > + * 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). 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120305/2fc9f485/attachment.pgp>