diff mbox series

[12/45] drm/ttm: drop free old node wrapper.

Message ID 20200924051845.397177-13-airlied@gmail.com (mailing list archive)
State New, archived
Headers show
Series TTM move refactoring | expand

Commit Message

Dave Airlie Sept. 24, 2020, 5:18 a.m. UTC
From: Dave Airlie <airlied@redhat.com>

This isn't really used anymore, if drivers needs it later,
just add back an inline wrapper.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/ttm/ttm_bo_util.c | 11 +++--------
 include/drm/ttm/ttm_bo_driver.h   |  9 ---------
 2 files changed, 3 insertions(+), 17 deletions(-)

Comments

Christian König Sept. 24, 2020, 11:23 a.m. UTC | #1
Am 24.09.20 um 07:18 schrieb Dave Airlie:
> From: Dave Airlie <airlied@redhat.com>
>
> This isn't really used anymore, if drivers needs it later,
> just add back an inline wrapper.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/ttm/ttm_bo_util.c | 11 +++--------
>   include/drm/ttm/ttm_bo_driver.h   |  9 ---------
>   2 files changed, 3 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
> index 0ad02e27865d..daf9a91857f8 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> @@ -45,11 +45,6 @@ struct ttm_transfer_obj {
>   	struct ttm_buffer_object *bo;
>   };
>   
> -void ttm_bo_free_old_node(struct ttm_buffer_object *bo)
> -{
> -	ttm_resource_free(bo, &bo->mem);
> -}
> -
>   int ttm_bo_move_to_new_tt_mem(struct ttm_buffer_object *bo,
>   			      struct ttm_operation_ctx *ctx,
>   			      struct ttm_resource *new_mem)
> @@ -90,7 +85,7 @@ static int ttm_bo_move_old_to_system(struct ttm_buffer_object *bo,
>   	}
>   
>   	ttm_bo_tt_unbind(bo);
> -	ttm_bo_free_old_node(bo);
> +	ttm_resource_free(bo, &bo->mem);
>   	old_mem->mem_type = TTM_PL_SYSTEM;
>   	return 0;
>   }
> @@ -557,7 +552,7 @@ static int ttm_bo_wait_free_node(struct ttm_buffer_object *bo,
>   
>   	if (!dst_use_tt)
>   		ttm_bo_tt_destroy(bo);
> -	ttm_bo_free_old_node(bo);
> +	ttm_resource_free(bo, &bo->mem);
>   	return 0;
>   }
>   
> @@ -618,7 +613,7 @@ static void ttm_bo_move_pipeline_evict(struct ttm_buffer_object *bo,
>   	}
>   	spin_unlock(&from->move_lock);
>   
> -	ttm_bo_free_old_node(bo);
> +	ttm_resource_free(bo, &bo->mem);
>   
>   	dma_fence_put(bo->moving);
>   	bo->moving = dma_fence_get(fence);
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index 20e6839e9b73..6690ec5d90ec 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -630,15 +630,6 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
>   		       struct ttm_operation_ctx *ctx,
>   		       struct ttm_resource *new_mem);
>   
> -/**
> - * ttm_bo_free_old_node
> - *
> - * @bo: A pointer to a struct ttm_buffer_object.
> - *
> - * Utility function to free an old placement after a successful move.
> - */
> -void ttm_bo_free_old_node(struct ttm_buffer_object *bo);
> -
>   /**
>    * ttm_bo_move_accel_cleanup.
>    *
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 0ad02e27865d..daf9a91857f8 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -45,11 +45,6 @@  struct ttm_transfer_obj {
 	struct ttm_buffer_object *bo;
 };
 
-void ttm_bo_free_old_node(struct ttm_buffer_object *bo)
-{
-	ttm_resource_free(bo, &bo->mem);
-}
-
 int ttm_bo_move_to_new_tt_mem(struct ttm_buffer_object *bo,
 			      struct ttm_operation_ctx *ctx,
 			      struct ttm_resource *new_mem)
@@ -90,7 +85,7 @@  static int ttm_bo_move_old_to_system(struct ttm_buffer_object *bo,
 	}
 
 	ttm_bo_tt_unbind(bo);
-	ttm_bo_free_old_node(bo);
+	ttm_resource_free(bo, &bo->mem);
 	old_mem->mem_type = TTM_PL_SYSTEM;
 	return 0;
 }
@@ -557,7 +552,7 @@  static int ttm_bo_wait_free_node(struct ttm_buffer_object *bo,
 
 	if (!dst_use_tt)
 		ttm_bo_tt_destroy(bo);
-	ttm_bo_free_old_node(bo);
+	ttm_resource_free(bo, &bo->mem);
 	return 0;
 }
 
@@ -618,7 +613,7 @@  static void ttm_bo_move_pipeline_evict(struct ttm_buffer_object *bo,
 	}
 	spin_unlock(&from->move_lock);
 
-	ttm_bo_free_old_node(bo);
+	ttm_resource_free(bo, &bo->mem);
 
 	dma_fence_put(bo->moving);
 	bo->moving = dma_fence_get(fence);
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 20e6839e9b73..6690ec5d90ec 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -630,15 +630,6 @@  int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
 		       struct ttm_operation_ctx *ctx,
 		       struct ttm_resource *new_mem);
 
-/**
- * ttm_bo_free_old_node
- *
- * @bo: A pointer to a struct ttm_buffer_object.
- *
- * Utility function to free an old placement after a successful move.
- */
-void ttm_bo_free_old_node(struct ttm_buffer_object *bo);
-
 /**
  * ttm_bo_move_accel_cleanup.
  *