return ret;
}
- man->use_type = false;
- man->has_type = false;
+ ttm_mem_type_manager_disable(man);
ret = 0;
if (mem_type > 0) {
ret = (*man->func->takedown)(man);
}
- dma_fence_put(man->move);
- man->move = NULL;
+ ttm_mem_type_manager_cleanup(man);
return ret;
}
man->use_type = used;
}
+/**
+ * ttm_mem_type_manager_disable.
+ *
+ * @man: A memory manager object.
+ *
+ * Indicate the manager is not to be used and deregistered. (temporary during rework).
+ */
+static inline void ttm_mem_type_manager_disable(struct ttm_mem_type_manager *man)
+{
+ man->has_type = false;
+ man->use_type = false;
+}
+
+/**
+ * ttm_mem_type_manager_cleanup
+ *
+ * @man: A memory manager object.
+ *
+ * Cleanup the move fences from the memory manager object.
+ */
+static inline void ttm_mem_type_manager_cleanup(struct ttm_mem_type_manager *man)
+{
+ dma_fence_put(man->move);
+ man->move = NULL;
+}
+
/*
* ttm_bo_util.c
*/