summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2024-07-16 14:28:40 +0200
committerChristian König <christian.koenig@amd.com>2025-05-26 15:34:00 +0200
commit9ec1ac835e489b9ab2776c0cbbb1b1ca813923a2 (patch)
treee20e3700af8796231f4253137b8704561cde971b
parenteb314613cd7c5fa5a26a2293d6ea935cf6cfaac0 (diff)
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
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_internal.h10
-rw-r--r--include/drm/ttm/ttm_bo.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_internal.h b/drivers/gpu/drm/ttm/ttm_bo_internal.h
index 6a7305efd778..9d8b747a34db 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_internal.h
+++ b/drivers/gpu/drm/ttm/ttm_bo_internal.h
@@ -28,6 +28,16 @@
#include <drm/ttm/ttm_bo.h>
/**
+ * ttm_bo_get - reference a struct ttm_buffer_object
+ *
+ * @bo: The buffer object.
+ */
+static inline void ttm_bo_get(struct ttm_buffer_object *bo)
+{
+ kref_get(&bo->kref);
+}
+
+/**
* ttm_bo_get_unless_zero - reference a struct ttm_buffer_object unless
* its refcount has already reached zero.
* @bo: The buffer object.
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index bf241698a527..8ad6e2713625 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -245,16 +245,6 @@ bool ttm_bo_shrink_suitable(struct ttm_buffer_object *bo, struct ttm_operation_c
bool ttm_bo_shrink_avoid_wait(void);
/**
- * ttm_bo_get - reference a struct ttm_buffer_object
- *
- * @bo: The buffer object.
- */
-static inline void ttm_bo_get(struct ttm_buffer_object *bo)
-{
- kref_get(&bo->kref);
-}
-
-/**
* ttm_bo_reserve:
*
* @bo: A pointer to a struct ttm_buffer_object.