Commit 36183150 authored by Christian König's avatar Christian König

drm/ttm: some cleanups

Unexport ttm_check_under_lowerlimit.
Make ttm_bo_acc_size static and unexport it.
Remove ttm_get_kernel_zone_memory_size.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/390515/
parent 05e63c6a
...@@ -1255,7 +1255,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev, ...@@ -1255,7 +1255,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
} }
EXPORT_SYMBOL(ttm_bo_init); EXPORT_SYMBOL(ttm_bo_init);
size_t ttm_bo_acc_size(struct ttm_bo_device *bdev, static size_t ttm_bo_acc_size(struct ttm_bo_device *bdev,
unsigned long bo_size, unsigned long bo_size,
unsigned struct_size) unsigned struct_size)
{ {
...@@ -1267,7 +1267,6 @@ size_t ttm_bo_acc_size(struct ttm_bo_device *bdev, ...@@ -1267,7 +1267,6 @@ size_t ttm_bo_acc_size(struct ttm_bo_device *bdev,
size += ttm_round_pot(sizeof(struct ttm_tt)); size += ttm_round_pot(sizeof(struct ttm_tt));
return size; return size;
} }
EXPORT_SYMBOL(ttm_bo_acc_size);
size_t ttm_bo_dma_acc_size(struct ttm_bo_device *bdev, size_t ttm_bo_dma_acc_size(struct ttm_bo_device *bdev,
unsigned long bo_size, unsigned long bo_size,
......
...@@ -554,7 +554,6 @@ ttm_check_under_lowerlimit(struct ttm_mem_global *glob, ...@@ -554,7 +554,6 @@ ttm_check_under_lowerlimit(struct ttm_mem_global *glob,
return false; return false;
} }
EXPORT_SYMBOL(ttm_check_under_lowerlimit);
static int ttm_mem_global_reserve(struct ttm_mem_global *glob, static int ttm_mem_global_reserve(struct ttm_mem_global *glob,
struct ttm_mem_zone *single_zone, struct ttm_mem_zone *single_zone,
...@@ -682,9 +681,3 @@ size_t ttm_round_pot(size_t size) ...@@ -682,9 +681,3 @@ size_t ttm_round_pot(size_t size)
return 0; return 0;
} }
EXPORT_SYMBOL(ttm_round_pot); EXPORT_SYMBOL(ttm_round_pot);
uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob)
{
return glob->zone_kernel->max_mem;
}
EXPORT_SYMBOL(ttm_get_kernel_zone_memory_size);
...@@ -353,18 +353,6 @@ void ttm_bo_unlock_delayed_workqueue(struct ttm_bo_device *bdev, int resched); ...@@ -353,18 +353,6 @@ void ttm_bo_unlock_delayed_workqueue(struct ttm_bo_device *bdev, int resched);
bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo, bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
const struct ttm_place *place); const struct ttm_place *place);
/**
* ttm_bo_acc_size
*
* @bdev: Pointer to a ttm_bo_device struct.
* @bo_size: size of the buffer object in byte.
* @struct_size: size of the structure holding buffer object datas
*
* Returns size to account for a buffer object
*/
size_t ttm_bo_acc_size(struct ttm_bo_device *bdev,
unsigned long bo_size,
unsigned struct_size);
size_t ttm_bo_dma_acc_size(struct ttm_bo_device *bdev, size_t ttm_bo_dma_acc_size(struct ttm_bo_device *bdev,
unsigned long bo_size, unsigned long bo_size,
unsigned struct_size); unsigned struct_size);
......
...@@ -91,7 +91,6 @@ extern int ttm_mem_global_alloc_page(struct ttm_mem_global *glob, ...@@ -91,7 +91,6 @@ extern int ttm_mem_global_alloc_page(struct ttm_mem_global *glob,
extern void ttm_mem_global_free_page(struct ttm_mem_global *glob, extern void ttm_mem_global_free_page(struct ttm_mem_global *glob,
struct page *page, uint64_t size); struct page *page, uint64_t size);
extern size_t ttm_round_pot(size_t size); extern size_t ttm_round_pot(size_t size);
extern uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob);
extern bool ttm_check_under_lowerlimit(struct ttm_mem_global *glob, extern bool ttm_check_under_lowerlimit(struct ttm_mem_global *glob,
uint64_t num_pages, struct ttm_operation_ctx *ctx); uint64_t num_pages, struct ttm_operation_ctx *ctx);
#endif #endif
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