Commit e56694f7 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: rename amdgpu_vm_bo_rmv to _del

Some people complained about the name and this matches much
more Linux naming conventions for object functions.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2d022081
...@@ -778,7 +778,7 @@ static int kfd_mem_attach(struct amdgpu_device *adev, struct kgd_mem *mem, ...@@ -778,7 +778,7 @@ static int kfd_mem_attach(struct amdgpu_device *adev, struct kgd_mem *mem,
continue; continue;
if (attachment[i]->bo_va) { if (attachment[i]->bo_va) {
amdgpu_bo_reserve(bo[i], true); amdgpu_bo_reserve(bo[i], true);
amdgpu_vm_bo_rmv(adev, attachment[i]->bo_va); amdgpu_vm_bo_del(adev, attachment[i]->bo_va);
amdgpu_bo_unreserve(bo[i]); amdgpu_bo_unreserve(bo[i]);
list_del(&attachment[i]->list); list_del(&attachment[i]->list);
} }
...@@ -795,7 +795,7 @@ static void kfd_mem_detach(struct kfd_mem_attachment *attachment) ...@@ -795,7 +795,7 @@ static void kfd_mem_detach(struct kfd_mem_attachment *attachment)
pr_debug("\t remove VA 0x%llx in entry %p\n", pr_debug("\t remove VA 0x%llx in entry %p\n",
attachment->va, attachment); attachment->va, attachment);
amdgpu_vm_bo_rmv(attachment->adev, attachment->bo_va); amdgpu_vm_bo_del(attachment->adev, attachment->bo_va);
drm_gem_object_put(&bo->tbo.base); drm_gem_object_put(&bo->tbo.base);
list_del(&attachment->list); list_del(&attachment->list);
kfree(attachment); kfree(attachment);
......
...@@ -98,7 +98,7 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm, ...@@ -98,7 +98,7 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm,
if (r) { if (r) {
DRM_ERROR("failed to do bo_map on static CSA, err=%d\n", r); DRM_ERROR("failed to do bo_map on static CSA, err=%d\n", r);
amdgpu_vm_bo_rmv(adev, *bo_va); amdgpu_vm_bo_del(adev, *bo_va);
ttm_eu_backoff_reservation(&ticket, &list); ttm_eu_backoff_reservation(&ticket, &list);
return r; return r;
} }
......
...@@ -222,7 +222,7 @@ static void amdgpu_gem_object_close(struct drm_gem_object *obj, ...@@ -222,7 +222,7 @@ static void amdgpu_gem_object_close(struct drm_gem_object *obj,
if (!bo_va || --bo_va->ref_count) if (!bo_va || --bo_va->ref_count)
goto out_unlock; goto out_unlock;
amdgpu_vm_bo_rmv(adev, bo_va); amdgpu_vm_bo_del(adev, bo_va);
if (!amdgpu_vm_ready(vm)) if (!amdgpu_vm_ready(vm))
goto out_unlock; goto out_unlock;
......
...@@ -1188,12 +1188,12 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, ...@@ -1188,12 +1188,12 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_VCE) != NULL) if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_VCE) != NULL)
amdgpu_vce_free_handles(adev, file_priv); amdgpu_vce_free_handles(adev, file_priv);
amdgpu_vm_bo_rmv(adev, fpriv->prt_va); amdgpu_vm_bo_del(adev, fpriv->prt_va);
if (amdgpu_mcbp || amdgpu_sriov_vf(adev)) { if (amdgpu_mcbp || amdgpu_sriov_vf(adev)) {
/* TODO: how to handle reserve failure */ /* TODO: how to handle reserve failure */
BUG_ON(amdgpu_bo_reserve(adev->virt.csa_obj, true)); BUG_ON(amdgpu_bo_reserve(adev->virt.csa_obj, true));
amdgpu_vm_bo_rmv(adev, fpriv->csa_va); amdgpu_vm_bo_del(adev, fpriv->csa_va);
fpriv->csa_va = NULL; fpriv->csa_va = NULL;
amdgpu_bo_unreserve(adev->virt.csa_obj); amdgpu_bo_unreserve(adev->virt.csa_obj);
} }
......
...@@ -2637,7 +2637,7 @@ void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket) ...@@ -2637,7 +2637,7 @@ void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket)
} }
/** /**
* amdgpu_vm_bo_rmv - remove a bo to a specific vm * amdgpu_vm_bo_del - remove a bo from a specific vm
* *
* @adev: amdgpu_device pointer * @adev: amdgpu_device pointer
* @bo_va: requested bo_va * @bo_va: requested bo_va
...@@ -2646,7 +2646,7 @@ void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket) ...@@ -2646,7 +2646,7 @@ void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket)
* *
* Object have to be reserved! * Object have to be reserved!
*/ */
void amdgpu_vm_bo_rmv(struct amdgpu_device *adev, void amdgpu_vm_bo_del(struct amdgpu_device *adev,
struct amdgpu_bo_va *bo_va) struct amdgpu_bo_va *bo_va)
{ {
struct amdgpu_bo_va_mapping *mapping, *next; struct amdgpu_bo_va_mapping *mapping, *next;
......
...@@ -435,7 +435,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, ...@@ -435,7 +435,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
struct amdgpu_bo_va_mapping *amdgpu_vm_bo_lookup_mapping(struct amdgpu_vm *vm, struct amdgpu_bo_va_mapping *amdgpu_vm_bo_lookup_mapping(struct amdgpu_vm *vm,
uint64_t addr); uint64_t addr);
void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket); void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket);
void amdgpu_vm_bo_rmv(struct amdgpu_device *adev, void amdgpu_vm_bo_del(struct amdgpu_device *adev,
struct amdgpu_bo_va *bo_va); struct amdgpu_bo_va *bo_va);
void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size, void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
uint32_t fragment_size_default, unsigned max_level, uint32_t fragment_size_default, unsigned max_level,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment