[v2,01/37] panfrost: Stop exposing internal panfrost_*_batch() functions

Submitted by Boris Brezillon on Sept. 16, 2019, 9:36 a.m.

Details

Message ID 20190916093715.32203-2-boris.brezillon@collabora.com
State New
Headers show
Series "panfrost: Support batch pipelining" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Boris Brezillon Sept. 16, 2019, 9:36 a.m.
panfrost_{create,free,get}_batch() are only called inside pan_job.c.
Let's make them static.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 src/gallium/drivers/panfrost/pan_job.c |  6 +++---
 src/gallium/drivers/panfrost/pan_job.h | 11 -----------
 2 files changed, 3 insertions(+), 14 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 00df90063428..03119e643846 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -31,7 +31,7 @@ 
 #include "util/u_format.h"
 #include "util/u_pack_color.h"
 
-struct panfrost_batch *
+static struct panfrost_batch *
 panfrost_create_batch(struct panfrost_context *ctx,
                       const struct pipe_framebuffer_state *key)
 {
@@ -54,7 +54,7 @@  panfrost_create_batch(struct panfrost_context *ctx,
         return batch;
 }
 
-void
+static void
 panfrost_free_batch(struct panfrost_batch *batch)
 {
         if (!batch)
@@ -79,7 +79,7 @@  panfrost_free_batch(struct panfrost_batch *batch)
         ralloc_free(batch);
 }
 
-struct panfrost_batch *
+static struct panfrost_batch *
 panfrost_get_batch(struct panfrost_context *ctx,
                    const struct pipe_framebuffer_state *key)
 {
diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h
index fe15e2dddabf..b0580ea2d470 100644
--- a/src/gallium/drivers/panfrost/pan_job.h
+++ b/src/gallium/drivers/panfrost/pan_job.h
@@ -115,17 +115,6 @@  struct panfrost_batch {
 
 /* Functions for managing the above */
 
-struct panfrost_batch *
-panfrost_create_batch(struct panfrost_context *ctx,
-                      const struct pipe_framebuffer_state *key);
-
-void
-panfrost_free_batch(struct panfrost_batch *batch);
-
-struct panfrost_batch *
-panfrost_get_batch(struct panfrost_context *ctx,
-                   const struct pipe_framebuffer_state *key);
-
 struct panfrost_batch *
 panfrost_get_batch_for_fbo(struct panfrost_context *ctx);
 

Comments

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>

On Mon, Sep 16, 2019 at 11:36:39AM +0200, Boris Brezillon wrote:
> panfrost_{create,free,get}_batch() are only called inside pan_job.c.
> Let's make them static.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>  src/gallium/drivers/panfrost/pan_job.c |  6 +++---
>  src/gallium/drivers/panfrost/pan_job.h | 11 -----------
>  2 files changed, 3 insertions(+), 14 deletions(-)
> 
> diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
> index 00df90063428..03119e643846 100644
> --- a/src/gallium/drivers/panfrost/pan_job.c
> +++ b/src/gallium/drivers/panfrost/pan_job.c
> @@ -31,7 +31,7 @@
>  #include "util/u_format.h"
>  #include "util/u_pack_color.h"
>  
> -struct panfrost_batch *
> +static struct panfrost_batch *
>  panfrost_create_batch(struct panfrost_context *ctx,
>                        const struct pipe_framebuffer_state *key)
>  {
> @@ -54,7 +54,7 @@ panfrost_create_batch(struct panfrost_context *ctx,
>          return batch;
>  }
>  
> -void
> +static void
>  panfrost_free_batch(struct panfrost_batch *batch)
>  {
>          if (!batch)
> @@ -79,7 +79,7 @@ panfrost_free_batch(struct panfrost_batch *batch)
>          ralloc_free(batch);
>  }
>  
> -struct panfrost_batch *
> +static struct panfrost_batch *
>  panfrost_get_batch(struct panfrost_context *ctx,
>                     const struct pipe_framebuffer_state *key)
>  {
> diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h
> index fe15e2dddabf..b0580ea2d470 100644
> --- a/src/gallium/drivers/panfrost/pan_job.h
> +++ b/src/gallium/drivers/panfrost/pan_job.h
> @@ -115,17 +115,6 @@ struct panfrost_batch {
>  
>  /* Functions for managing the above */
>  
> -struct panfrost_batch *
> -panfrost_create_batch(struct panfrost_context *ctx,
> -                      const struct pipe_framebuffer_state *key);
> -
> -void
> -panfrost_free_batch(struct panfrost_batch *batch);
> -
> -struct panfrost_batch *
> -panfrost_get_batch(struct panfrost_context *ctx,
> -                   const struct pipe_framebuffer_state *key);
> -
>  struct panfrost_batch *
>  panfrost_get_batch_for_fbo(struct panfrost_context *ctx);
>  
> -- 
> 2.21.0