All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Enable explicit TLB invalidation control
@ 2013-01-20 17:08 Chris Wilson
  2013-01-21 20:47 ` Imre Deak
  2013-01-21 22:38 ` Daniel Vetter
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2013-01-20 17:08 UTC (permalink / raw)
  To: intel-gfx

During the initial bringup of IVB, we set the invalidation control to
the pre-IVB default of always invalidating TLBs on every flush:

commit b095cd0a0ccdbc00c9fd99d90b22f8563687971f
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Fri Aug 12 15:28:32 2011 -0700

    drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge

We now have the required invalidates in place, so enable the
optimisation and avoid the unnecessary flushes when we use pipe controls
inside batches.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index ae816fb..2d6d220 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -520,7 +520,7 @@ static int init_render_ring(struct intel_ring_buffer *ring)
 
 	if (IS_GEN7(dev))
 		I915_WRITE(GFX_MODE_GEN7,
-			   _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) |
+			   _MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_ALWAYS) |
 			   _MASKED_BIT_ENABLE(GFX_REPLAY_MODE));
 
 	if (INTEL_INFO(dev)->gen >= 5) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Enable explicit TLB invalidation control
  2013-01-20 17:08 [PATCH] drm/i915: Enable explicit TLB invalidation control Chris Wilson
@ 2013-01-21 20:47 ` Imre Deak
  2013-01-21 22:38 ` Daniel Vetter
  1 sibling, 0 replies; 4+ messages in thread
From: Imre Deak @ 2013-01-21 20:47 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Sun, 2013-01-20 at 17:08 +0000, Chris Wilson wrote:
> During the initial bringup of IVB, we set the invalidation control to
> the pre-IVB default of always invalidating TLBs on every flush:
> 
> commit b095cd0a0ccdbc00c9fd99d90b22f8563687971f
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date:   Fri Aug 12 15:28:32 2011 -0700
> 
>     drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge
> 
> We now have the required invalidates in place, so enable the
> optimisation and avoid the unnecessary flushes when we use pipe controls
> inside batches.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index ae816fb..2d6d220 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -520,7 +520,7 @@ static int init_render_ring(struct intel_ring_buffer *ring)
>  
>  	if (IS_GEN7(dev))
>  		I915_WRITE(GFX_MODE_GEN7,
> -			   _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) |
> +			   _MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_ALWAYS) |
>  			   _MASKED_BIT_ENABLE(GFX_REPLAY_MODE));
>  
>  	if (INTEL_INFO(dev)->gen >= 5) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Enable explicit TLB invalidation control
  2013-01-20 17:08 [PATCH] drm/i915: Enable explicit TLB invalidation control Chris Wilson
  2013-01-21 20:47 ` Imre Deak
@ 2013-01-21 22:38 ` Daniel Vetter
  2013-01-22  1:04   ` Chris Wilson
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2013-01-21 22:38 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Sun, Jan 20, 2013 at 05:08:23PM +0000, Chris Wilson wrote:
> During the initial bringup of IVB, we set the invalidation control to
> the pre-IVB default of always invalidating TLBs on every flush:
> 
> commit b095cd0a0ccdbc00c9fd99d90b22f8563687971f
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date:   Fri Aug 12 15:28:32 2011 -0700
> 
>     drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge
> 
> We now have the required invalidates in place, so enable the
> optimisation and avoid the unnecessary flushes when we use pipe controls
> inside batches.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

While I try to figure out how to merge this into dinq without causing too
many conflicts with the patches in -fixes two bikesheds:
- can we have a less confusing #define for this - the code reads as if we
  enable the always invalidate mode now ...
- does this blow up on gen6 (docs say no), or should we try?

Cheers, Daniel
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index ae816fb..2d6d220 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -520,7 +520,7 @@ static int init_render_ring(struct intel_ring_buffer *ring)
>  
>  	if (IS_GEN7(dev))
>  		I915_WRITE(GFX_MODE_GEN7,
> -			   _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) |
> +			   _MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_ALWAYS) |
>  			   _MASKED_BIT_ENABLE(GFX_REPLAY_MODE));
>  
>  	if (INTEL_INFO(dev)->gen >= 5) {
> -- 
> 1.7.10.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Enable explicit TLB invalidation control
  2013-01-21 22:38 ` Daniel Vetter
@ 2013-01-22  1:04   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2013-01-22  1:04 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Mon, Jan 21, 2013 at 11:38:06PM +0100, Daniel Vetter wrote:
> On Sun, Jan 20, 2013 at 05:08:23PM +0000, Chris Wilson wrote:
> > During the initial bringup of IVB, we set the invalidation control to
> > the pre-IVB default of always invalidating TLBs on every flush:
> > 
> > commit b095cd0a0ccdbc00c9fd99d90b22f8563687971f
> > Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Date:   Fri Aug 12 15:28:32 2011 -0700
> > 
> >     drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge
> > 
> > We now have the required invalidates in place, so enable the
> > optimisation and avoid the unnecessary flushes when we use pipe controls
> > inside batches.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> While I try to figure out how to merge this into dinq without causing too
> many conflicts with the patches in -fixes two bikesheds:
> - can we have a less confusing #define for this - the code reads as if we
>   enable the always invalidate mode now ...

Sure, but you get more conflicts that way...
Taking the name from the docs, it should be GFX_TLB_INVALIDATE_MODE.

> - does this blow up on gen6 (docs say no), or should we try?

It is a required w/a on gen6 for the hw to modify the scanlines register,
hence the previous patch.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-22  1:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-20 17:08 [PATCH] drm/i915: Enable explicit TLB invalidation control Chris Wilson
2013-01-21 20:47 ` Imre Deak
2013-01-21 22:38 ` Daniel Vetter
2013-01-22  1:04   ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.