[Intel-gfx] [PATCH 2/3] i915: Rename PIPE_CONTROL bit defines to be less terse.

Daniel Vetter daniel at ffwll.ch
Wed Oct 5 12:05:54 CEST 2011


On Tue, Oct 04, 2011 at 10:13:47PM -0700, Kenneth Graunke wrote:
> On 10/04/2011 01:30 AM, Daniel Vetter wrote:
> > On Mon, Oct 03, 2011 at 11:02:39PM -0700, Kenneth Graunke wrote:
> >> "STALL_AT_SCOREBOARD" is much clearer than "STALL_EN" now that there are
> >> several different kinds of stalls.  Also, "INSTRUCTION_CACHE_FLUSH" is a
> >> lot easier to understand at a glance than the terse "IS_FLUSH."
> >>
> >> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> >> ---
> >>  drivers/gpu/drm/i915/i915_reg.h         |   16 ++++++++--------
> >>  drivers/gpu/drm/i915/intel_ringbuffer.c |    6 ++++--
> >>  2 files changed, 12 insertions(+), 10 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> >> index d691781..bfe8488 100644
> >> --- a/drivers/gpu/drm/i915/i915_reg.h
> >> +++ b/drivers/gpu/drm/i915/i915_reg.h
> >> @@ -243,15 +243,15 @@
> >>  #define   DISPLAY_PLANE_A           (0<<20)
> >>  #define   DISPLAY_PLANE_B           (1<<20)
> >>  #define GFX_OP_PIPE_CONTROL	((0x3<<29)|(0x3<<27)|(0x2<<24))
> >> -#define   PIPE_CONTROL_QW_WRITE	(1<<14)
> >> -#define   PIPE_CONTROL_DEPTH_STALL (1<<13)
> >> -#define   PIPE_CONTROL_WC_FLUSH	(1<<12)
> >> -#define   PIPE_CONTROL_IS_FLUSH	(1<<11) /* MBZ on Ironlake */
> >> -#define   PIPE_CONTROL_TC_FLUSH (1<<10) /* GM45+ only */
> >> -#define   PIPE_CONTROL_ISP_DIS	(1<<9)
> >> -#define   PIPE_CONTROL_NOTIFY	(1<<8)
> >> +#define   PIPE_CONTROL_QW_WRITE			(1<<14)
> >> +#define   PIPE_CONTROL_DEPTH_STALL		(1<<13)
> >> +#define   PIPE_CONTROL_WRITE_FLUSH		(1<<12)
> >> +#define   PIPE_CONTROL_INSTRUCTION_CACHE_FLUSH	(1<<11) /* MBZ on Ironlake */
> >> +#define   PIPE_CONTROL_TEXTURE_CACHE_FLUSH	(1<<10) /* GM45+ only */
> > 
> > Minor bikeshed: You retain the _FLUSH for the read-only
> > instruction/texture caches, but use _INVALIDATE for the new bits for
> > read-only caches. I think we want _INVALIDATE for all of them.
> > 
> > Otherwise, these three patches are:
> > Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> 
> Yeah.  The docs for pre-SNB use "Flush" in all the field names, while
> the docs for SNB+ switch to "Invalidate".  So I just used it for the new
> ones.  If we'd rather go with "invalidate" for the old bits too, I can
> do that.

Invalidate agrees more with our own cache tracking code and how the legacy
MI_FLUSH is defined. So I vote for that because I like my bikesheds to be
painted consistenly ;-)
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list