drm/ttm: drop free old node wrapper.
authorDave Airlie <airlied@redhat.com>
Wed, 23 Sep 2020 00:25:08 +0000 (10:25 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 19 Oct 2020 05:17:22 +0000 (15:17 +1000)
This isn't really used anymore, if drivers needs it later,
just add back an inline wrapper.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-13-airlied@gmail.com
drivers/gpu/drm/ttm/ttm_bo_util.c
include/drm/ttm/ttm_bo_driver.h

index ba7ab5ed85d00081e4d250cf725178c78d69c6cb..ed1114235b66ec8ef6324315bea81aec64cc2e9d 100644 (file)
@@ -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_ttm(struct ttm_buffer_object *bo,
                   struct ttm_operation_ctx *ctx,
                    struct ttm_resource *new_mem)
@@ -68,7 +63,7 @@ int ttm_bo_move_ttm(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;
        }
 
@@ -537,7 +532,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;
 }
 
@@ -598,7 +593,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);
index f29419cb7980abd9116d4305e0c31b9c149b33df..3dbc11eb678755aee8af3aa14e36e10fc526e7cd 100644 (file)
@@ -615,15 +615,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.
  *