summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/drm/ttm/ttm_bo_api.h15
-rw-r--r--include/drm/ttm/ttm_bo_driver.h15
2 files changed, 30 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index b1c705a93517..cc876cd3b82c 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -54,6 +54,8 @@ struct ttm_place;
struct ttm_lru_bulk_move;
+struct ttm_mem_type_manager;
+
/**
* struct ttm_bus_placement
*
@@ -532,6 +534,19 @@ int ttm_bo_create(struct ttm_bo_device *bdev, unsigned long size,
struct ttm_buffer_object **p_bo);
/**
+ * ttm_mem_type_manager_init
+ *
+ * @bdev: Pointer to a ttm_bo_device struct.
+ * @man: memory manager object to init
+ * @p_size: size managed area in pages.
+ *
+ * Initialise core parts of a a manager object.
+ */
+void ttm_mem_type_manager_init(struct ttm_bo_device *bdev,
+ struct ttm_mem_type_manager *man,
+ unsigned long p_size);
+
+/**
* ttm_bo_init_mm
*
* @bdev: Pointer to a ttm_bo_device struct.
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index ee11ae621c3b..02aa1b996b3a 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -689,6 +689,21 @@ static inline void ttm_bo_unreserve(struct ttm_buffer_object *bo)
dma_resv_unlock(bo->base.resv);
}
+/**
+ * ttm_mem_type_manager_set_used
+ *
+ * @man: A memory manager object.
+ * @used: usage state to set.
+ *
+ * Set the manager in use flag. If disabled the manager is no longer
+ * used for object placement.
+ */
+static inline void ttm_mem_type_manager_set_used(struct ttm_mem_type_manager *man, bool used)
+{
+ man->has_type = true;
+ man->use_type = used;
+}
+
/*
* ttm_bo_util.c
*/