diff options
author | Christian König <christian.koenig@amd.com> | 2020-08-03 15:06:38 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-08-12 15:50:51 +0200 |
commit | e92ae67d6ed881e9c6d6d432eb6b5817f150a115 (patch) | |
tree | 119415f7a5796d9842243a7f37cd85c0a9b2637f /drivers | |
parent | 13b0d4a9ae0c2d650993c48be797992eaf621332 (diff) | |
download | linux-e92ae67d6ed881e9c6d6d432eb6b5817f150a115.tar.bz2 |
drm/ttm: rename ttm_resource_manager_func callbacks
The names get/put are associated with reference counting
in the Linux kernel, use alloc/free instead.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/384340/?series=80346&rev=1
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_range_manager.c | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 4 |
7 files changed, 27 insertions, 27 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c index 010518148ef8..bab8feed46da 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c @@ -311,7 +311,7 @@ static void amdgpu_gtt_mgr_debug(struct ttm_resource_manager *man, } static const struct ttm_resource_manager_func amdgpu_gtt_mgr_func = { - .get_node = amdgpu_gtt_mgr_new, - .put_node = amdgpu_gtt_mgr_del, + .alloc = amdgpu_gtt_mgr_new, + .free = amdgpu_gtt_mgr_del, .debug = amdgpu_gtt_mgr_debug }; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c index 7882efd275d1..ff70ae00e602 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c @@ -606,7 +606,7 @@ static void amdgpu_vram_mgr_debug(struct ttm_resource_manager *man, } static const struct ttm_resource_manager_func amdgpu_vram_mgr_func = { - .get_node = amdgpu_vram_mgr_new, - .put_node = amdgpu_vram_mgr_del, - .debug = amdgpu_vram_mgr_debug + .alloc = amdgpu_vram_mgr_new, + .free = amdgpu_vram_mgr_del, + .debug = amdgpu_vram_mgr_debug }; diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index e6a30865a00b..53c6f8827322 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -64,8 +64,8 @@ nouveau_vram_manager_new(struct ttm_resource_manager *man, } const struct ttm_resource_manager_func nouveau_vram_manager = { - .get_node = nouveau_vram_manager_new, - .put_node = nouveau_manager_del, + .alloc = nouveau_vram_manager_new, + .free = nouveau_manager_del, }; static int @@ -87,8 +87,8 @@ nouveau_gart_manager_new(struct ttm_resource_manager *man, } const struct ttm_resource_manager_func nouveau_gart_manager = { - .get_node = nouveau_gart_manager_new, - .put_node = nouveau_manager_del, + .alloc = nouveau_gart_manager_new, + .free = nouveau_manager_del, }; static int @@ -119,8 +119,8 @@ nv04_gart_manager_new(struct ttm_resource_manager *man, } const struct ttm_resource_manager_func nv04_gart_manager = { - .get_node = nv04_gart_manager_new, - .put_node = nouveau_manager_del, + .alloc = nv04_gart_manager_new, + .free = nouveau_manager_del, }; int diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index ad09329b62d3..ae71c3ab6cc4 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -846,20 +846,20 @@ static int ttm_bo_mem_get(struct ttm_buffer_object *bo, struct ttm_resource_manager *man = ttm_manager_type(bo->bdev, mem->mem_type); mem->mm_node = NULL; - if (!man->func || !man->func->get_node) + if (!man->func || !man->func->alloc) return 0; - return man->func->get_node(man, bo, place, mem); + return man->func->alloc(man, bo, place, mem); } void ttm_bo_mem_put(struct ttm_buffer_object *bo, struct ttm_resource *mem) { struct ttm_resource_manager *man = ttm_manager_type(bo->bdev, mem->mem_type); - if (!man->func || !man->func->put_node) + if (!man->func || !man->func->free) return; - man->func->put_node(man, mem); + man->func->free(man, mem); mem->mm_node = NULL; mem->mem_type = TTM_PL_SYSTEM; } diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c index 274a05ca13d3..770c8988c139 100644 --- a/drivers/gpu/drm/ttm/ttm_range_manager.c +++ b/drivers/gpu/drm/ttm/ttm_range_manager.c @@ -54,10 +54,10 @@ static inline struct ttm_range_manager *to_range_manager(struct ttm_resource_man return container_of(man, struct ttm_range_manager, manager); } -static int ttm_range_man_get_node(struct ttm_resource_manager *man, - struct ttm_buffer_object *bo, - const struct ttm_place *place, - struct ttm_resource *mem) +static int ttm_range_man_alloc(struct ttm_resource_manager *man, + struct ttm_buffer_object *bo, + const struct ttm_place *place, + struct ttm_resource *mem) { struct ttm_range_manager *rman = to_range_manager(man); struct drm_mm *mm = &rman->mm; @@ -95,8 +95,8 @@ static int ttm_range_man_get_node(struct ttm_resource_manager *man, return ret; } -static void ttm_range_man_put_node(struct ttm_resource_manager *man, - struct ttm_resource *mem) +static void ttm_range_man_free(struct ttm_resource_manager *man, + struct ttm_resource *mem) { struct ttm_range_manager *rman = to_range_manager(man); @@ -181,7 +181,7 @@ static void ttm_range_man_debug(struct ttm_resource_manager *man, } static const struct ttm_resource_manager_func ttm_range_manager_func = { - .get_node = ttm_range_man_get_node, - .put_node = ttm_range_man_put_node, + .alloc = ttm_range_man_alloc, + .free = ttm_range_man_free, .debug = ttm_range_man_debug }; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c index 3fea7a6c7cfa..bb76acb5b0fc 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c @@ -156,6 +156,6 @@ void vmw_gmrid_man_fini(struct vmw_private *dev_priv, int type) } static const struct ttm_resource_manager_func vmw_gmrid_manager_func = { - .get_node = vmw_gmrid_man_get_node, - .put_node = vmw_gmrid_man_put_node, + .alloc = vmw_gmrid_man_get_node, + .free = vmw_gmrid_man_put_node, }; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c index f594e2e6ab7e..3c00a9e7cfcc 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c @@ -177,7 +177,7 @@ static void vmw_thp_debug(struct ttm_resource_manager *man, } const struct ttm_resource_manager_func vmw_thp_func = { - .get_node = vmw_thp_get_node, - .put_node = vmw_thp_put_node, + .alloc = vmw_thp_get_node, + .free = vmw_thp_put_node, .debug = vmw_thp_debug }; |