aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/ttm/ttm_bo_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/ttm/ttm_bo_driver.h')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h28
1 files changed, 9 insertions, 19 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 7a39ab9aa1d1..ff7664e0c3cd 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -242,12 +242,6 @@ struct ttm_mem_type_manager {
242/** 242/**
243 * struct ttm_bo_driver 243 * struct ttm_bo_driver
244 * 244 *
245 * @mem_type_prio: Priority array of memory types to place a buffer object in
246 * if it fits without evicting buffers from any of these memory types.
247 * @mem_busy_prio: Priority array of memory types to place a buffer object in
248 * if it needs to evict buffers to make room.
249 * @num_mem_type_prio: Number of elements in the @mem_type_prio array.
250 * @num_mem_busy_prio: Number of elements in the @num_mem_busy_prio array.
251 * @create_ttm_backend_entry: Callback to create a struct ttm_backend. 245 * @create_ttm_backend_entry: Callback to create a struct ttm_backend.
252 * @invalidate_caches: Callback to invalidate read caches when a buffer object 246 * @invalidate_caches: Callback to invalidate read caches when a buffer object
253 * has been evicted. 247 * has been evicted.
@@ -265,11 +259,6 @@ struct ttm_mem_type_manager {
265 */ 259 */
266 260
267struct ttm_bo_driver { 261struct ttm_bo_driver {
268 const uint32_t *mem_type_prio;
269 const uint32_t *mem_busy_prio;
270 uint32_t num_mem_type_prio;
271 uint32_t num_mem_busy_prio;
272
273 /** 262 /**
274 * struct ttm_bo_driver member create_ttm_backend_entry 263 * struct ttm_bo_driver member create_ttm_backend_entry
275 * 264 *
@@ -306,7 +295,8 @@ struct ttm_bo_driver {
306 * finished, they'll end up in bo->mem.flags 295 * finished, they'll end up in bo->mem.flags
307 */ 296 */
308 297
309 uint32_t(*evict_flags) (struct ttm_buffer_object *bo); 298 void(*evict_flags) (struct ttm_buffer_object *bo,
299 struct ttm_placement *placement);
310 /** 300 /**
311 * struct ttm_bo_driver member move: 301 * struct ttm_bo_driver member move:
312 * 302 *
@@ -648,12 +638,12 @@ extern bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev,
648 * -EBUSY: No space available (only if no_wait == 1). 638 * -EBUSY: No space available (only if no_wait == 1).
649 * -ENOMEM: Could not allocate memory for the buffer object, either due to 639 * -ENOMEM: Could not allocate memory for the buffer object, either due to
650 * fragmentation or concurrent allocators. 640 * fragmentation or concurrent allocators.
651 * -ERESTART: An interruptible sleep was interrupted by a signal. 641 * -ERESTARTSYS: An interruptible sleep was interrupted by a signal.
652 */ 642 */
653extern int ttm_bo_mem_space(struct ttm_buffer_object *bo, 643extern int ttm_bo_mem_space(struct ttm_buffer_object *bo,
654 uint32_t proposed_placement, 644 struct ttm_placement *placement,
655 struct ttm_mem_reg *mem, 645 struct ttm_mem_reg *mem,
656 bool interruptible, bool no_wait); 646 bool interruptible, bool no_wait);
657/** 647/**
658 * ttm_bo_wait_for_cpu 648 * ttm_bo_wait_for_cpu
659 * 649 *
@@ -663,7 +653,7 @@ extern int ttm_bo_mem_space(struct ttm_buffer_object *bo,
663 * Wait until a buffer object is no longer sync'ed for CPU access. 653 * Wait until a buffer object is no longer sync'ed for CPU access.
664 * Returns: 654 * Returns:
665 * -EBUSY: Buffer object was sync'ed for CPU access. (only if no_wait == 1). 655 * -EBUSY: Buffer object was sync'ed for CPU access. (only if no_wait == 1).
666 * -ERESTART: An interruptible sleep was interrupted by a signal. 656 * -ERESTARTSYS: An interruptible sleep was interrupted by a signal.
667 */ 657 */
668 658
669extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait); 659extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait);
@@ -767,7 +757,7 @@ extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo);
767 * -EAGAIN: The reservation may cause a deadlock. 757 * -EAGAIN: The reservation may cause a deadlock.
768 * Release all buffer reservations, wait for @bo to become unreserved and 758 * Release all buffer reservations, wait for @bo to become unreserved and
769 * try again. (only if use_sequence == 1). 759 * try again. (only if use_sequence == 1).
770 * -ERESTART: A wait for the buffer to become unreserved was interrupted by 760 * -ERESTARTSYS: A wait for the buffer to become unreserved was interrupted by
771 * a signal. Release all buffer reservations and return to user-space. 761 * a signal. Release all buffer reservations and return to user-space.
772 */ 762 */
773extern int ttm_bo_reserve(struct ttm_buffer_object *bo, 763extern int ttm_bo_reserve(struct ttm_buffer_object *bo,
@@ -808,7 +798,7 @@ extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo,
808 * 798 *
809 * Returns: 799 * Returns:
810 * -EBUSY: If no_wait == 1 and the buffer is already reserved. 800 * -EBUSY: If no_wait == 1 and the buffer is already reserved.
811 * -ERESTART: If interruptible == 1 and the process received a signal 801 * -ERESTARTSYS: If interruptible == 1 and the process received a signal
812 * while sleeping. 802 * while sleeping.
813 */ 803 */
814extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo, 804extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo,