aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/drm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2022-02-15 17:29:59 +0100
committerChristian König <christian.koenig@amd.com>2022-03-29 10:54:58 +0200
commit7842cf65b0401814a9df518a86a41641255c84d3 (patch)
treeca45d159d8384a5c69461aef352bca3bf7d9e9c5 /include/drm
parentdrm/nouveau/kms/nv50-: atom: fix an incorrect NULL check on list iterator (diff)
downloadwireguard-linux-7842cf65b0401814a9df518a86a41641255c84d3.tar.xz
wireguard-linux-7842cf65b0401814a9df518a86a41641255c84d3.zip
drm/ttm: de-inline ttm_bo_pin/unpin
Those functions are going to become more complex, don't inline them any more. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20220321132601.2161-4-christian.koenig@amd.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/ttm/ttm_bo_api.h30
1 files changed, 2 insertions, 28 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index 3da77fc54552..885b7698fd65 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -524,34 +524,8 @@ ssize_t ttm_bo_io(struct ttm_device *bdev, struct file *filp,
int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
gfp_t gfp_flags);
-/**
- * ttm_bo_pin - Pin the buffer object.
- * @bo: The buffer object to pin
- *
- * Make sure the buffer is not evicted any more during memory pressure.
- */
-static inline void ttm_bo_pin(struct ttm_buffer_object *bo)
-{
- dma_resv_assert_held(bo->base.resv);
- WARN_ON_ONCE(!kref_read(&bo->kref));
- ++bo->pin_count;
-}
-
-/**
- * ttm_bo_unpin - Unpin the buffer object.
- * @bo: The buffer object to unpin
- *
- * Allows the buffer object to be evicted again during memory pressure.
- */
-static inline void ttm_bo_unpin(struct ttm_buffer_object *bo)
-{
- dma_resv_assert_held(bo->base.resv);
- WARN_ON_ONCE(!kref_read(&bo->kref));
- if (bo->pin_count)
- --bo->pin_count;
- else
- WARN_ON_ONCE(true);
-}
+void ttm_bo_pin(struct ttm_buffer_object *bo);
+void ttm_bo_unpin(struct ttm_buffer_object *bo);
int ttm_mem_evict_first(struct ttm_device *bdev,
struct ttm_resource_manager *man,