Re: [Mesa-dev] [PATCH 1/4] i965: Transplant PIPE_CONTROL routines to brw_pipe_control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, May 01, 2015 03:53:40 PM Chris Wilson wrote:
> Start trimming the fat from intel_batchbuffer.c. First by moving the set
> of routines for emitting PIPE_CONTROLS (along with the lore concerning
> hardware workarounds) to a separate brw_pipe_control.c
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  src/mesa/drivers/dri/i965/Makefile.sources    |   1 +
>  src/mesa/drivers/dri/i965/brw_context.h       |  12 +
>  src/mesa/drivers/dri/i965/brw_pipe_control.c  | 335 ++++++++++++++++++++++++++
>  src/mesa/drivers/dri/i965/intel_batchbuffer.c | 304 -----------------------
>  src/mesa/drivers/dri/i965/intel_batchbuffer.h |  10 -
>  5 files changed, 348 insertions(+), 314 deletions(-)
>  create mode 100644 src/mesa/drivers/dri/i965/brw_pipe_control.c
> 
> diff --git a/src/mesa/drivers/dri/i965/Makefile.sources b/src/mesa/drivers/dri/i965/Makefile.sources
> index 6d4659f..a9f9129 100644
> --- a/src/mesa/drivers/dri/i965/Makefile.sources
> +++ b/src/mesa/drivers/dri/i965/Makefile.sources
> @@ -82,6 +82,7 @@ i965_FILES = \
>  	brw_object_purgeable.c \
>  	brw_packed_float.c \
>  	brw_performance_monitor.c \
> +	brw_pipe_control.c \
>  	brw_primitive_restart.c \
>  	brw_program.c \
>  	brw_program.h \
> diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
> index e2f26f5..7241816 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.h
> +++ b/src/mesa/drivers/dri/i965/brw_context.h
> @@ -1945,6 +1945,18 @@ gen6_upload_push_constants(struct brw_context *brw,
>                             struct brw_stage_state *stage_state,
>                             enum aub_state_struct_type type);
>  
> +/* brw_pipe_control.c */
> +void brw_emit_pipe_control_flush(struct brw_context *brw, uint32_t flags);
> +void brw_emit_pipe_control_write(struct brw_context *brw, uint32_t flags,
> +                                 drm_intel_bo *bo, uint32_t offset,
> +                                 uint32_t imm_lower, uint32_t imm_upper);
> +void intel_batchbuffer_emit_mi_flush(struct brw_context *brw);
> +void intel_emit_post_sync_nonzero_flush(struct brw_context *brw);
> +void intel_emit_depth_stall_flushes(struct brw_context *brw);
> +void gen7_emit_vs_workaround_flush(struct brw_context *brw);
> +void gen7_emit_cs_stall_flush(struct brw_context *brw);
> +
> +
>  #ifdef __cplusplus
>  }
>  #endif
> diff --git a/src/mesa/drivers/dri/i965/brw_pipe_control.c b/src/mesa/drivers/dri/i965/brw_pipe_control.c
> new file mode 100644
> index 0000000..c216f6d
> --- /dev/null
> +++ b/src/mesa/drivers/dri/i965/brw_pipe_control.c
> @@ -0,0 +1,335 @@
> +/**************************************************************************
> + *
> + * Copyright 2006 VMware, Inc.
> + * All Rights Reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the
> + * "Software"), to deal in the Software without restriction, including
> + * without limitation the rights to use, copy, modify, merge, publish,
> + * distribute, sub license, and/or sell copies of the Software, and to
> + * permit persons to whom the Software is furnished to do so, subject to
> + * the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the
> + * next paragraph) shall be included in all copies or substantial portions
> + * of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
> + * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
> + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> + *
> + **************************************************************************/

I did a bit of archaeology, and all of the Tungsten Graphics code appears to
be long gone:

   gen8_add_cs_stall_workaround_bits - me (2014)
   gen7_cs_stall_every_four_pipe_controls - me (2014)
   brw_emit_pipe_control_flush - me (2013)
   brw_emit_pipe_control_write - me (2013)
   intel_emit_post_sync_nonzero_flush - Eric (2011)
   intel_emit_depth_stall_flushes - me (2011)
   gen7_emit_vs_workaround_flush - me (2012)
   gen7_emit_cs_stall_flush - Paul (2013)
   intel_batchbuffer_emit_mi_flush - Zhenyu (2010), Eric, and I

So I'd use this copyright instead (with more typical formatting):

/*
 * Copyright © 2010 Intel Corporation
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

I love that PIPE_CONTROL has its own source file now :D

Patches 1-2 are:
Reviewed-by: Kenneth Graunke <kenneth@xxxxxxxxxxxxx>

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux