[v2,11/37] panfrost: Stop exposing panfrost_bo_cache_{fetch, put}()

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

Details

Message ID 20190916093715.32203-12-boris.brezillon@collabora.com
State Accepted
Commit a06e08def9cce4854c8d524adeb75b9a2cbfa154
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.
They are not expected to be called directly, users should use
panfrost_bo_{create,release}() instead.

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

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/pan_bo.c b/src/gallium/drivers/panfrost/pan_bo.c
index e6a5c972ead9..23273abc5f22 100644
--- a/src/gallium/drivers/panfrost/pan_bo.c
+++ b/src/gallium/drivers/panfrost/pan_bo.c
@@ -89,7 +89,7 @@  pan_bucket(struct panfrost_screen *screen, unsigned size)
  * cache. If it fails, it returns NULL signaling the caller to allocate a new
  * BO. */
 
-struct panfrost_bo *
+static struct panfrost_bo *
 panfrost_bo_cache_fetch(
                 struct panfrost_screen *screen,
                 size_t size, uint32_t flags)
@@ -130,7 +130,7 @@  panfrost_bo_cache_fetch(
 /* Tries to add a BO to the cache. Returns if it was
  * successful */
 
-bool
+static bool
 panfrost_bo_cache_put(
                 struct panfrost_screen *screen,
                 struct panfrost_bo *bo)
diff --git a/src/gallium/drivers/panfrost/pan_bo.h b/src/gallium/drivers/panfrost/pan_bo.h
index 6d17ebecf6e6..5afaa0c873d3 100644
--- a/src/gallium/drivers/panfrost/pan_bo.h
+++ b/src/gallium/drivers/panfrost/pan_bo.h
@@ -88,12 +88,6 @@  struct panfrost_bo *
 panfrost_bo_import(struct panfrost_screen *screen, int fd);
 int
 panfrost_bo_export(struct panfrost_screen *screen, const struct panfrost_bo *bo);
-struct panfrost_bo *
-panfrost_bo_cache_fetch(struct panfrost_screen *screen,
-		        size_t size, uint32_t flags);
-bool
-panfrost_bo_cache_put(struct panfrost_screen *screen,
-                      struct panfrost_bo *bo);
 void
 panfrost_bo_cache_evict_all(struct panfrost_screen *screen);
 

Comments

R-b

On Mon, Sep 16, 2019 at 11:36:49AM +0200, Boris Brezillon wrote:
> They are not expected to be called directly, users should use
> panfrost_bo_{create,release}() instead.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>  src/gallium/drivers/panfrost/pan_bo.c | 4 ++--
>  src/gallium/drivers/panfrost/pan_bo.h | 6 ------
>  2 files changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/src/gallium/drivers/panfrost/pan_bo.c b/src/gallium/drivers/panfrost/pan_bo.c
> index e6a5c972ead9..23273abc5f22 100644
> --- a/src/gallium/drivers/panfrost/pan_bo.c
> +++ b/src/gallium/drivers/panfrost/pan_bo.c
> @@ -89,7 +89,7 @@ pan_bucket(struct panfrost_screen *screen, unsigned size)
>   * cache. If it fails, it returns NULL signaling the caller to allocate a new
>   * BO. */
>  
> -struct panfrost_bo *
> +static struct panfrost_bo *
>  panfrost_bo_cache_fetch(
>                  struct panfrost_screen *screen,
>                  size_t size, uint32_t flags)
> @@ -130,7 +130,7 @@ panfrost_bo_cache_fetch(
>  /* Tries to add a BO to the cache. Returns if it was
>   * successful */
>  
> -bool
> +static bool
>  panfrost_bo_cache_put(
>                  struct panfrost_screen *screen,
>                  struct panfrost_bo *bo)
> diff --git a/src/gallium/drivers/panfrost/pan_bo.h b/src/gallium/drivers/panfrost/pan_bo.h
> index 6d17ebecf6e6..5afaa0c873d3 100644
> --- a/src/gallium/drivers/panfrost/pan_bo.h
> +++ b/src/gallium/drivers/panfrost/pan_bo.h
> @@ -88,12 +88,6 @@ struct panfrost_bo *
>  panfrost_bo_import(struct panfrost_screen *screen, int fd);
>  int
>  panfrost_bo_export(struct panfrost_screen *screen, const struct panfrost_bo *bo);
> -struct panfrost_bo *
> -panfrost_bo_cache_fetch(struct panfrost_screen *screen,
> -		        size_t size, uint32_t flags);
> -bool
> -panfrost_bo_cache_put(struct panfrost_screen *screen,
> -                      struct panfrost_bo *bo);
>  void
>  panfrost_bo_cache_evict_all(struct panfrost_screen *screen);
>  
> -- 
> 2.21.0