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@pengutronix.de> Tested-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14159>
This commit is contained in:
parent
77ebbcbf9a
commit
98a2049c08
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue