Lines Matching full:bulk

36 /* Detach the cursor from the bulk move list*/
42 cursor->bulk = NULL; in ttm_resource_cursor_clear_bulk()
46 /* Move the cursor to the end of the bulk move list it's in */
47 static void ttm_resource_cursor_move_bulk_tail(struct ttm_lru_bulk_move *bulk, in ttm_resource_cursor_move_bulk_tail() argument
54 if (WARN_ON_ONCE(bulk != cursor->bulk)) { in ttm_resource_cursor_move_bulk_tail()
59 pos = &bulk->pos[cursor->mem_type][cursor->priority]; in ttm_resource_cursor_move_bulk_tail()
65 /* Move all cursors attached to a bulk move to its end */
66 static void ttm_bulk_move_adjust_cursors(struct ttm_lru_bulk_move *bulk) in ttm_bulk_move_adjust_cursors() argument
70 list_for_each_entry_safe(cursor, next, &bulk->cursor_list, bulk_link) in ttm_bulk_move_adjust_cursors()
71 ttm_resource_cursor_move_bulk_tail(bulk, cursor); in ttm_bulk_move_adjust_cursors()
74 /* Remove a cursor from an empty bulk move list */
75 static void ttm_bulk_move_drop_cursors(struct ttm_lru_bulk_move *bulk) in ttm_bulk_move_drop_cursors() argument
79 list_for_each_entry_safe(cursor, next, &bulk->cursor_list, bulk_link) in ttm_bulk_move_drop_cursors()
99 * ttm_lru_bulk_move_init - initialize a bulk move structure
100 * @bulk: the structure to init
104 void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk) in ttm_lru_bulk_move_init() argument
106 memset(bulk, 0, sizeof(*bulk)); in ttm_lru_bulk_move_init()
107 INIT_LIST_HEAD(&bulk->cursor_list); in ttm_lru_bulk_move_init()
112 * ttm_lru_bulk_move_fini - finalize a bulk move structure
114 * @bulk: the structure to finalize
116 * Sanity checks that bulk moves don't have any
120 struct ttm_lru_bulk_move *bulk) in ttm_lru_bulk_move_fini() argument
123 ttm_bulk_move_drop_cursors(bulk); in ttm_lru_bulk_move_fini()
129 * ttm_lru_bulk_move_tail - bulk move range of resources to the LRU tail.
131 * @bulk: bulk move structure
133 * Bulk move BOs to the LRU tail, only valid to use when driver makes sure that
136 void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk) in ttm_lru_bulk_move_tail() argument
140 ttm_bulk_move_adjust_cursors(bulk); in ttm_lru_bulk_move_tail()
143 struct ttm_lru_bulk_move_pos *pos = &bulk->pos[i][j]; in ttm_lru_bulk_move_tail()
161 /* Return the bulk move pos object for this resource */
163 ttm_lru_bulk_move_pos(struct ttm_lru_bulk_move *bulk, struct ttm_resource *res) in ttm_lru_bulk_move_pos() argument
165 return &bulk->pos[res->mem_type][res->bo->priority]; in ttm_lru_bulk_move_pos()
192 /* Move the resource to the tail of the bulk move range */
205 static void ttm_lru_bulk_move_add(struct ttm_lru_bulk_move *bulk, in ttm_lru_bulk_move_add() argument
208 struct ttm_lru_bulk_move_pos *pos = ttm_lru_bulk_move_pos(bulk, res); in ttm_lru_bulk_move_add()
220 static void ttm_lru_bulk_move_del(struct ttm_lru_bulk_move *bulk, in ttm_lru_bulk_move_del() argument
223 struct ttm_lru_bulk_move_pos *pos = ttm_lru_bulk_move_pos(bulk, res); in ttm_lru_bulk_move_del()
238 /* Add the resource to a bulk move if the BO is configured for it */
246 /* Remove the resource from a bulk move if the BO is configured for it */
254 /* Move a resource to the LRU or bulk tail */
560 struct ttm_lru_bulk_move *bulk = NULL; in ttm_resource_cursor_check_bulk() local
564 bulk = bo->bulk_move; in ttm_resource_cursor_check_bulk()
566 if (cursor->bulk != bulk) { in ttm_resource_cursor_check_bulk()
567 if (bulk) { in ttm_resource_cursor_check_bulk()
568 list_move_tail(&cursor->bulk_link, &bulk->cursor_list); in ttm_resource_cursor_check_bulk()
573 cursor->bulk = bulk; in ttm_resource_cursor_check_bulk()