Mesa (main): etnaviv: drm: rename _etna_bo_del
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jan 10 16:57:47 UTC 2022
Module: Mesa
Branch: main
Commit: 98a2049c0839824a4824df342be2dd0e79b8c4ec
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=98a2049c0839824a4824df342be2dd0e79b8c4ec
Author: Lucas Stach <l.stach at pengutronix.de>
Date: Fri Dec 10 22:35:34 2021 +0100
etnaviv: drm: rename _etna_bo_del
Rename it to a somwhat more descriptive name, which makes it easier
to distinguish between the etna_bo_del function in the public interface
and the internal function. Also remove the duplicated forward declaration
and move it to the common interal header.
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
Tested-by: Guido Günther <agx at sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14159>
---
src/etnaviv/drm/etnaviv_bo.c | 5 ++---
src/etnaviv/drm/etnaviv_bo_cache.c | 4 +---
src/etnaviv/drm/etnaviv_priv.h | 2 ++
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/etnaviv/drm/etnaviv_bo.c b/src/etnaviv/drm/etnaviv_bo.c
index ceb22dc5d73..64d049b345a 100644
--- a/src/etnaviv/drm/etnaviv_bo.c
+++ b/src/etnaviv/drm/etnaviv_bo.c
@@ -31,7 +31,6 @@
#include "etnaviv_drmif.h"
simple_mtx_t etna_drm_table_lock = _SIMPLE_MTX_INITIALIZER_NP;
-void _etna_bo_del(struct etna_bo *bo);
/* set buffer name, and add to table, call w/ etna_drm_table_lock held: */
static void set_name(struct etna_bo *bo, uint32_t name)
@@ -52,7 +51,7 @@ int etna_bo_is_idle(struct etna_bo *bo)
}
/* Called under etna_drm_table_lock */
-void _etna_bo_del(struct etna_bo *bo)
+void etna_bo_free(struct etna_bo *bo)
{
DEBUG_BO("Del bo:", bo);
VG_BO_FREE(bo);
@@ -295,7 +294,7 @@ void etna_bo_del(struct etna_bo *bo)
if (bo->reuse && (etna_bo_cache_free(&dev->bo_cache, bo) == 0))
goto out;
- _etna_bo_del(bo);
+ etna_bo_free(bo);
etna_device_del_locked(dev);
out:
simple_mtx_unlock(&etna_drm_table_lock);
diff --git a/src/etnaviv/drm/etnaviv_bo_cache.c b/src/etnaviv/drm/etnaviv_bo_cache.c
index 3635170604b..6828a69f671 100644
--- a/src/etnaviv/drm/etnaviv_bo_cache.c
+++ b/src/etnaviv/drm/etnaviv_bo_cache.c
@@ -27,8 +27,6 @@
#include "etnaviv_priv.h"
#include "etnaviv_drmif.h"
-void _etna_bo_del(struct etna_bo *bo);
-
static void add_bucket(struct etna_bo_cache *cache, int size)
{
unsigned i = cache->num_buckets;
@@ -86,7 +84,7 @@ void etna_bo_cache_cleanup(struct etna_bo_cache *cache, time_t time)
VG_BO_OBTAIN(bo);
list_del(&bo->list);
- _etna_bo_del(bo);
+ etna_bo_free(bo);
}
}
diff --git a/src/etnaviv/drm/etnaviv_priv.h b/src/etnaviv/drm/etnaviv_priv.h
index 6a00e9832cc..3e8d673447d 100644
--- a/src/etnaviv/drm/etnaviv_priv.h
+++ b/src/etnaviv/drm/etnaviv_priv.h
@@ -88,6 +88,8 @@ struct etna_device {
int closefd; /* call close(fd) upon destruction */
};
+void etna_bo_free(struct etna_bo *bo);
+
void etna_bo_cache_init(struct etna_bo_cache *cache);
void etna_bo_cache_cleanup(struct etna_bo_cache *cache, time_t time);
struct etna_bo *etna_bo_cache_alloc(struct etna_bo_cache *cache,
More information about the mesa-commit
mailing list