Skip to content

Commit 9ec1ac8

Browse files
drm/ttm: make ttm_bo_get internal
Prevent drivers from using this directly. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Link: https://lore.kernel.org/r/20240723121750.2086-8-christian.koenig@amd.com
1 parent eb31461 commit 9ec1ac8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

drivers/gpu/drm/ttm/ttm_bo_internal.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@
2727

2828
#include <drm/ttm/ttm_bo.h>
2929

30+
/**
31+
* ttm_bo_get - reference a struct ttm_buffer_object
32+
*
33+
* @bo: The buffer object.
34+
*/
35+
static inline void ttm_bo_get(struct ttm_buffer_object *bo)
36+
{
37+
kref_get(&bo->kref);
38+
}
39+
3040
/**
3141
* ttm_bo_get_unless_zero - reference a struct ttm_buffer_object unless
3242
* its refcount has already reached zero.

include/drm/ttm/ttm_bo.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -244,16 +244,6 @@ bool ttm_bo_shrink_suitable(struct ttm_buffer_object *bo, struct ttm_operation_c
244244

245245
bool ttm_bo_shrink_avoid_wait(void);
246246

247-
/**
248-
* ttm_bo_get - reference a struct ttm_buffer_object
249-
*
250-
* @bo: The buffer object.
251-
*/
252-
static inline void ttm_bo_get(struct ttm_buffer_object *bo)
253-
{
254-
kref_get(&bo->kref);
255-
}
256-
257247
/**
258248
* ttm_bo_reserve:
259249
*

0 commit comments

Comments
 (0)