aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/ttm
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/ttm')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h9
-rw-r--r--include/drm/ttm/ttm_object.h18
-rw-r--r--include/drm/ttm/ttm_page_alloc.h2
3 files changed, 27 insertions, 2 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 8639c85d61c4..32d34ebf0706 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -681,6 +681,15 @@ extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement);
681extern int ttm_tt_swapout(struct ttm_tt *ttm, 681extern int ttm_tt_swapout(struct ttm_tt *ttm,
682 struct file *persistent_swap_storage); 682 struct file *persistent_swap_storage);
683 683
684/**
685 * ttm_tt_unpopulate - free pages from a ttm
686 *
687 * @ttm: Pointer to the ttm_tt structure
688 *
689 * Calls the driver method to free all pages from a ttm
690 */
691extern void ttm_tt_unpopulate(struct ttm_tt *ttm);
692
684/* 693/*
685 * ttm_bo.c 694 * ttm_bo.c
686 */ 695 */
diff --git a/include/drm/ttm/ttm_object.h b/include/drm/ttm/ttm_object.h
index 58b029894eb3..0097cc03034e 100644
--- a/include/drm/ttm/ttm_object.h
+++ b/include/drm/ttm/ttm_object.h
@@ -190,14 +190,26 @@ extern int ttm_base_object_init(struct ttm_object_file *tfile,
190 * @key: Hash key 190 * @key: Hash key
191 * 191 *
192 * Looks up a struct ttm_base_object with the key @key. 192 * Looks up a struct ttm_base_object with the key @key.
193 * Also verifies that the object is visible to the application, by
194 * comparing the @tfile argument and checking the object shareable flag.
195 */ 193 */
196 194
197extern struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file 195extern struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file
198 *tfile, uint32_t key); 196 *tfile, uint32_t key);
199 197
200/** 198/**
199 * ttm_base_object_lookup_for_ref
200 *
201 * @tdev: Pointer to a struct ttm_object_device.
202 * @key: Hash key
203 *
204 * Looks up a struct ttm_base_object with the key @key.
205 * This function should only be used when the struct tfile associated with the
206 * caller doesn't yet have a reference to the base object.
207 */
208
209extern struct ttm_base_object *
210ttm_base_object_lookup_for_ref(struct ttm_object_device *tdev, uint32_t key);
211
212/**
201 * ttm_base_object_unref 213 * ttm_base_object_unref
202 * 214 *
203 * @p_base: Pointer to a pointer referencing a struct ttm_base_object. 215 * @p_base: Pointer to a pointer referencing a struct ttm_base_object.
@@ -218,6 +230,8 @@ extern void ttm_base_object_unref(struct ttm_base_object **p_base);
218 * @existed: Upon completion, indicates that an identical reference object 230 * @existed: Upon completion, indicates that an identical reference object
219 * already existed, and the refcount was upped on that object instead. 231 * already existed, and the refcount was upped on that object instead.
220 * 232 *
233 * Checks that the base object is shareable and adds a ref object to it.
234 *
221 * Adding a ref object to a base object is basically like referencing the 235 * Adding a ref object to a base object is basically like referencing the
222 * base object, but a user-space application holds the reference. When the 236 * base object, but a user-space application holds the reference. When the
223 * file corresponding to @tfile is closed, all its reference objects are 237 * file corresponding to @tfile is closed, all its reference objects are
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index d1f61bfe0ebe..49a828425fa2 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -29,6 +29,8 @@
29#include <drm/ttm/ttm_bo_driver.h> 29#include <drm/ttm/ttm_bo_driver.h>
30#include <drm/ttm/ttm_memory.h> 30#include <drm/ttm/ttm_memory.h>
31 31
32struct device;
33
32/** 34/**
33 * Initialize pool allocator. 35 * Initialize pool allocator.
34 */ 36 */