[Mesa-dev] [PATCH 22/22] radeonsi: cleanup includes, add missing license
Tom Stellard
tom at stellard.net
Thu Jan 23 07:21:19 PST 2014
On Wed, Jan 22, 2014 at 09:13:14PM +0100, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> ---
> src/gallium/drivers/radeonsi/si_blit.c | 5 ++---
> src/gallium/drivers/radeonsi/si_commands.c | 1 -
> src/gallium/drivers/radeonsi/si_compute.c | 25 +++++++++++++++++++++++
> src/gallium/drivers/radeonsi/si_descriptors.c | 1 +
> src/gallium/drivers/radeonsi/si_hw_context.c | 7 +------
> src/gallium/drivers/radeonsi/si_pipe.c | 29 +++++----------------------
> src/gallium/drivers/radeonsi/si_pipe.h | 10 ---------
> src/gallium/drivers/radeonsi/si_pm4.c | 1 -
> src/gallium/drivers/radeonsi/si_shader.c | 8 --------
> src/gallium/drivers/radeonsi/si_state.c | 21 +++++++++----------
> src/gallium/drivers/radeonsi/si_state_draw.c | 13 ++++++------
> src/gallium/drivers/radeonsi/si_uvd.c | 14 -------------
> 12 files changed, 49 insertions(+), 86 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
> index 250caab..aa3177a 100644
> --- a/src/gallium/drivers/radeonsi/si_blit.c
> +++ b/src/gallium/drivers/radeonsi/si_blit.c
> @@ -20,11 +20,10 @@
> * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
> * USE OR OTHER DEALINGS IN THE SOFTWARE.
> */
> -#include "util/u_surface.h"
> +
> +#include "si_pipe.h"
> #include "util/u_blitter.h"
> #include "util/u_format.h"
> -#include "si_pipe.h"
> -#include "si_state.h"
>
> enum si_blitter_op /* bitmask */
> {
> diff --git a/src/gallium/drivers/radeonsi/si_commands.c b/src/gallium/drivers/radeonsi/si_commands.c
> index a020ac3..5ddc40e 100644
> --- a/src/gallium/drivers/radeonsi/si_commands.c
> +++ b/src/gallium/drivers/radeonsi/si_commands.c
> @@ -26,7 +26,6 @@
>
> #include "sid.h"
> #include "si_pipe.h"
> -#include "si_pm4.h"
>
> void si_cmd_context_control(struct si_pm4_state *pm4)
> {
> diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
> index 3aea799..a7f49e7 100644
> --- a/src/gallium/drivers/radeonsi/si_compute.c
> +++ b/src/gallium/drivers/radeonsi/si_compute.c
> @@ -1,8 +1,33 @@
> +/*
> + * Copyright 2013 Advanced Micro Devices, Inc.
> + *
> + * 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
> + * on 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
> + * THE AUTHOR(S) AND/OR THEIR 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.
> + *
> + */
> +
> #include "util/u_memory.h"
>
> #include "../radeon/r600_cs.h"
> #include "si_pipe.h"
> #include "si_shader.h"
> +#include "sid.h"
>
> #include "radeon_llvm_util.h"
>
> diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
> index d48dbc0..5a7fac1 100644
> --- a/src/gallium/drivers/radeonsi/si_descriptors.c
> +++ b/src/gallium/drivers/radeonsi/si_descriptors.c
> @@ -26,6 +26,7 @@
> #include "../radeon/r600_cs.h"
> #include "si_pipe.h"
> #include "si_shader.h"
> +#include "sid.h"
>
> #include "util/u_memory.h"
> #include "util/u_upload_mgr.h"
> diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
> index 2e1e9f2..7e40255 100644
> --- a/src/gallium/drivers/radeonsi/si_hw_context.c
> +++ b/src/gallium/drivers/radeonsi/si_hw_context.c
> @@ -23,13 +23,8 @@
> * Authors:
> * Jerome Glisse
> */
> -#include "../radeon/r600_cs.h"
> -#include "sid.h"
> -#include "si_pm4.h"
> -#include "si_pipe.h"
> -#include "util/u_memory.h"
> -#include <errno.h>
>
> +#include "si_pipe.h"
>
> /* initialize */
> void si_need_cs_space(struct si_context *ctx, unsigned num_dw,
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
> index 85a9177..a08f872 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -20,34 +20,15 @@
> * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
> * USE OR OTHER DEALINGS IN THE SOFTWARE.
> */
> -#include <stdio.h>
> -#include <errno.h>
> -#include "pipe/p_defines.h"
> -#include "pipe/p_state.h"
> -#include "pipe/p_context.h"
> -#include "tgsi/tgsi_scan.h"
> -#include "tgsi/tgsi_parse.h"
> -#include "tgsi/tgsi_util.h"
> +
> +#include "si_pipe.h"
> +#include "si_public.h"
> +
> +#include "radeon/radeon_uvd.h"
> #include "util/u_blitter.h"
> -#include "util/u_double_list.h"
> -#include "util/u_format.h"
> -#include "util/u_transfer.h"
> -#include "util/u_surface.h"
> -#include "util/u_pack_color.h"
> #include "util/u_memory.h"
> -#include "util/u_inlines.h"
> #include "util/u_simple_shaders.h"
> -#include "util/u_upload_mgr.h"
> #include "vl/vl_decoder.h"
> -#include "vl/vl_video_buffer.h"
> -#include "os/os_time.h"
> -#include "pipebuffer/pb_buffer.h"
> -#include "si_pipe.h"
> -#include "radeon/radeon_uvd.h"
> -#include "sid.h"
> -#include "si_pipe.h"
> -#include "si_state.h"
> -#include "../radeon/r600_cs.h"
>
> /*
> * pipe_context
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
> index 38eb128..3c27e67 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.h
> +++ b/src/gallium/drivers/radeonsi/si_pipe.h
> @@ -26,16 +26,6 @@
> #ifndef SI_PIPE_H
> #define SI_PIPE_H
>
> -#include "../radeon/r600_pipe_common.h"
> -
> -#include "pipe/p_screen.h"
> -#include "pipe/p_context.h"
> -#include "util/u_format.h"
> -#include "util/u_math.h"
> -#include "util/u_slab.h"
> -#include "sid.h"
> -#include "si_public.h"
> -#include "si_pm4.h"
> #include "si_state.h"
>
> #ifdef PIPE_ARCH_BIG_ENDIAN
> diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c
> index c876937..51bf67e 100644
> --- a/src/gallium/drivers/radeonsi/si_pm4.c
> +++ b/src/gallium/drivers/radeonsi/si_pm4.c
> @@ -27,7 +27,6 @@
> #include "../radeon/r600_cs.h"
> #include "util/u_memory.h"
> #include "si_pipe.h"
> -#include "si_pm4.h"
> #include "sid.h"
>
> #define NUMBER_OF_STATES (sizeof(union si_state) / sizeof(struct si_pm4_state *))
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 6497ef7..59188b1 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -1,4 +1,3 @@
> -
> /*
> * Copyright 2012 Advanced Micro Devices, Inc.
> *
> @@ -27,31 +26,24 @@
> * Christian König <christian.koenig at amd.com>
> */
>
> -#include "gallivm/lp_bld_tgsi_action.h"
> #include "gallivm/lp_bld_const.h"
> #include "gallivm/lp_bld_gather.h"
> #include "gallivm/lp_bld_intr.h"
> #include "gallivm/lp_bld_logic.h"
> -#include "gallivm/lp_bld_tgsi.h"
> #include "gallivm/lp_bld_arit.h"
> #include "gallivm/lp_bld_flow.h"
> #include "radeon_llvm.h"
> #include "radeon_llvm_emit.h"
> #include "util/u_memory.h"
> -#include "tgsi/tgsi_info.h"
> #include "tgsi/tgsi_parse.h"
> -#include "tgsi/tgsi_scan.h"
> #include "tgsi/tgsi_util.h"
> #include "tgsi/tgsi_dump.h"
>
> #include "si_pipe.h"
> #include "si_shader.h"
> -#include "si_state.h"
> #include "sid.h"
>
> -#include <assert.h>
> #include <errno.h>
> -#include <stdio.h>
>
> struct si_shader_context
> {
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index fd4e26a..49fbe42 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -24,21 +24,18 @@
> * Christian König <christian.koenig at amd.com>
> */
>
> -#include "util/u_memory.h"
> -#include "util/u_framebuffer.h"
> -#include "util/u_blitter.h"
> -#include "util/u_helpers.h"
> -#include "util/u_math.h"
> -#include "util/u_pack_color.h"
> -#include "util/u_upload_mgr.h"
> -#include "util/u_format_s3tc.h"
> -#include "tgsi/tgsi_parse.h"
> -#include "tgsi/tgsi_scan.h"
> #include "si_pipe.h"
> #include "si_shader.h"
> -#include "si_state.h"
> -#include "../radeon/r600_cs.h"
> #include "sid.h"
> +#include "../radeon/r600_cs.h"
> +
> +#include "tgsi/tgsi_parse.h"
> +#include "tgsi/tgsi_scan.h"
> +#include "util/u_format.h"
> +#include "util/u_format_s3tc.h"
> +#include "util/u_framebuffer.h"
> +#include "util/u_helpers.h"
> +#include "util/u_memory.h"
>
> static uint32_t cik_num_banks(struct si_screen *sscreen, unsigned bpe, unsigned tile_split)
> {
> diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
> index 8dbf373..94d3ab6 100644
> --- a/src/gallium/drivers/radeonsi/si_state_draw.c
> +++ b/src/gallium/drivers/radeonsi/si_state_draw.c
> @@ -24,18 +24,17 @@
> * Christian König <christian.koenig at amd.com>
> */
>
> -#include "util/u_memory.h"
> -#include "util/u_framebuffer.h"
> -#include "util/u_blitter.h"
> -#include "util/u_index_modify.h"
> -#include "util/u_upload_mgr.h"
> -#include "tgsi/tgsi_parse.h"
> #include "si_pipe.h"
> #include "si_shader.h"
> -#include "si_state.h"
> #include "../radeon/r600_cs.h"
> #include "sid.h"
>
> +#include "util/u_blitter.h"
> +#include "util/u_format.h"
> +#include "util/u_index_modify.h"
> +#include "util/u_memory.h"
> +#include "util/u_upload_mgr.h"
> +
> /*
> * Shaders
> */
> diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c
> index 5a7cbd3..f0d1427 100644
> --- a/src/gallium/drivers/radeonsi/si_uvd.c
> +++ b/src/gallium/drivers/radeonsi/si_uvd.c
> @@ -31,22 +31,8 @@
> *
> */
>
> -#include <sys/types.h>
> -#include <assert.h>
> -#include <errno.h>
> -#include <unistd.h>
> -
> -#include "pipe/p_video_codec.h"
> -
> -#include "util/u_memory.h"
> -#include "util/u_video.h"
> -
> -#include "vl/vl_defines.h"
> -#include "vl/vl_mpeg12_decoder.h"
> -
> #include "si_pipe.h"
> #include "radeon/radeon_uvd.h"
> -#include "sid.h"
>
> /**
> * creates an video buffer with an UVD compatible memory layout
> --
> 1.8.3.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list