summaryrefslogtreecommitdiff
path: root/include/drm/ttm/ttm_bo_driver.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-08-04 05:55:46 +0300
committerDave Airlie <airlied@redhat.com>2020-08-06 05:31:29 +0300
commit747074bb04b5a6be8e562d06b5a312d6ddb253d0 (patch)
tree7487a788034d14dd2dd499aafc85cb7880d99fcd /include/drm/ttm/ttm_bo_driver.h
parente22054debc079ed1c9db7561b8efda43a078fbe0 (diff)
downloadlinux-747074bb04b5a6be8e562d06b5a312d6ddb253d0.tar.xz
drm/ttm: split the mm manager init code (v2)
This will allow the driver to control the ordering here better. Eventually the old path will be removed. v2: add docs for new APIs. rename new path to ttm_mem_type_manager_init/set_used(for now) Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-14-airlied@gmail.com
Diffstat (limited to 'include/drm/ttm/ttm_bo_driver.h')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h15
1 files changed, 15 insertions, 0 deletions
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
*/