[Intel-gfx] [PATCH 1/3] i915: Remove implied length of 2 from GFX_OP_PIPE_CONTROL #define.

Ben Widawsky ben at bwidawsk.net
Wed Oct 5 22:35:45 CEST 2011


On Mon, Oct 03, 2011 at 11:02:38PM -0700, Kenneth Graunke wrote:
> Not all PIPE_CONTROLs have a length of 2, so remove it from the #define
> and make each invocation specify the desired length.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  drivers/gpu/drm/i915/i915_reg.h         |    2 +-
>  drivers/gpu/drm/i915/intel_ringbuffer.c |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 138eae1..d691781 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -242,7 +242,7 @@
>  #define   ASYNC_FLIP                (1<<22)
>  #define   DISPLAY_PLANE_A           (0<<20)
>  #define   DISPLAY_PLANE_B           (1<<20)
> -#define GFX_OP_PIPE_CONTROL	((0x3<<29)|(0x3<<27)|(0x2<<24)|2)
> +#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)

Can you do this like the other multilength commands we use?
Domething like:
#define GFX_OP_PIPE_CONTROL(n) ((0x3<<29)|(0x3<<27)|(0x2<<24) | n)

Ben



More information about the Intel-gfx mailing list