aboutsummaryrefslogtreecommitdiff
path: root/include/drm/ttm/ttm_page_alloc.h
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2011-11-02 23:59:28 -0400
committerDave Airlie <airlied@redhat.com>2011-12-06 10:39:24 +0000
commitb1e5f172325547270f35e7d1e42416a606e1dbd2 (patch)
tree03fc21fd5f74add89441308008b45987d09cfbc6 /include/drm/ttm/ttm_page_alloc.h
parent649bf3ca77343e3be1e0af8e21356fa569b1abd9 (diff)
drm/ttm: introduce callback for ttm_tt populate & unpopulate V4
Move the page allocation and freeing to driver callback and provide ttm code helper function for those. Most intrusive change, is the fact that we now only fully populate an object this simplify some of code designed around the page fault design. V2 Rebase on top of memory accounting overhaul V3 New rebase on top of more memory accouting changes V4 Rebase on top of no memory account changes (where/when is my delorean when i need it ?) Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'include/drm/ttm/ttm_page_alloc.h')
-rw-r--r--include/drm/ttm/ttm_page_alloc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index fe61c8d8568..18deeee2349 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -68,6 +68,24 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages);
void ttm_page_alloc_fini(void);
/**
+ * ttm_pool_populate:
+ *
+ * @ttm: The struct ttm_tt to contain the backing pages.
+ *
+ * Add backing pages to all of @ttm
+ */
+extern int ttm_pool_populate(struct ttm_tt *ttm);
+
+/**
+ * ttm_pool_unpopulate:
+ *
+ * @ttm: The struct ttm_tt which to free backing pages.
+ *
+ * Free all pages of @ttm
+ */
+extern void ttm_pool_unpopulate(struct ttm_tt *ttm);
+
+/**
* Output the state of pools to debugfs file
*/
extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data);