diff options
Diffstat (limited to 'include/drm/ttm/ttm_bo_driver.h')
-rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index e8cd6d20aed2..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 | ||
267 | struct ttm_bo_driver { | 261 | struct 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 | * |
@@ -545,6 +535,15 @@ extern int ttm_tt_set_user(struct ttm_tt *ttm, | |||
545 | extern int ttm_tt_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem); | 535 | extern int ttm_tt_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem); |
546 | 536 | ||
547 | /** | 537 | /** |
538 | * ttm_tt_populate: | ||
539 | * | ||
540 | * @ttm: The struct ttm_tt to contain the backing pages. | ||
541 | * | ||
542 | * Add backing pages to all of @ttm | ||
543 | */ | ||
544 | extern int ttm_tt_populate(struct ttm_tt *ttm); | ||
545 | |||
546 | /** | ||
548 | * ttm_ttm_destroy: | 547 | * ttm_ttm_destroy: |
549 | * | 548 | * |
550 | * @ttm: The struct ttm_tt. | 549 | * @ttm: The struct ttm_tt. |
@@ -639,12 +638,12 @@ extern bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev, | |||
639 | * -EBUSY: No space available (only if no_wait == 1). | 638 | * -EBUSY: No space available (only if no_wait == 1). |
640 | * -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 |
641 | * fragmentation or concurrent allocators. | 640 | * fragmentation or concurrent allocators. |
642 | * -ERESTART: An interruptible sleep was interrupted by a signal. | 641 | * -ERESTARTSYS: An interruptible sleep was interrupted by a signal. |
643 | */ | 642 | */ |
644 | extern int ttm_bo_mem_space(struct ttm_buffer_object *bo, | 643 | extern int ttm_bo_mem_space(struct ttm_buffer_object *bo, |
645 | uint32_t proposed_placement, | 644 | struct ttm_placement *placement, |
646 | struct ttm_mem_reg *mem, | 645 | struct ttm_mem_reg *mem, |
647 | bool interruptible, bool no_wait); | 646 | bool interruptible, bool no_wait); |
648 | /** | 647 | /** |
649 | * ttm_bo_wait_for_cpu | 648 | * ttm_bo_wait_for_cpu |
650 | * | 649 | * |
@@ -654,7 +653,7 @@ extern int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
654 | * 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. |
655 | * Returns: | 654 | * Returns: |
656 | * -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). |
657 | * -ERESTART: An interruptible sleep was interrupted by a signal. | 656 | * -ERESTARTSYS: An interruptible sleep was interrupted by a signal. |
658 | */ | 657 | */ |
659 | 658 | ||
660 | extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait); | 659 | extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait); |
@@ -758,7 +757,7 @@ extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo); | |||
758 | * -EAGAIN: The reservation may cause a deadlock. | 757 | * -EAGAIN: The reservation may cause a deadlock. |
759 | * Release all buffer reservations, wait for @bo to become unreserved and | 758 | * Release all buffer reservations, wait for @bo to become unreserved and |
760 | * try again. (only if use_sequence == 1). | 759 | * try again. (only if use_sequence == 1). |
761 | * -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 |
762 | * a signal. Release all buffer reservations and return to user-space. | 761 | * a signal. Release all buffer reservations and return to user-space. |
763 | */ | 762 | */ |
764 | extern int ttm_bo_reserve(struct ttm_buffer_object *bo, | 763 | extern int ttm_bo_reserve(struct ttm_buffer_object *bo, |
@@ -799,7 +798,7 @@ extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, | |||
799 | * | 798 | * |
800 | * Returns: | 799 | * Returns: |
801 | * -EBUSY: If no_wait == 1 and the buffer is already reserved. | 800 | * -EBUSY: If no_wait == 1 and the buffer is already reserved. |
802 | * -ERESTART: If interruptible == 1 and the process received a signal | 801 | * -ERESTARTSYS: If interruptible == 1 and the process received a signal |
803 | * while sleeping. | 802 | * while sleeping. |
804 | */ | 803 | */ |
805 | extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo, | 804 | extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo, |