Lines Matching full:bulk

38 /* Detach the cursor from the bulk move list*/
44 cursor->bulk = NULL; in ttm_resource_cursor_clear_bulk()
48 /* Move the cursor to the end of the bulk move list it's in */
49 static void ttm_resource_cursor_move_bulk_tail(struct ttm_lru_bulk_move *bulk, in ttm_resource_cursor_move_bulk_tail() argument
56 if (WARN_ON_ONCE(bulk != cursor->bulk)) { in ttm_resource_cursor_move_bulk_tail()
61 pos = &bulk->pos[cursor->mem_type][cursor->priority]; in ttm_resource_cursor_move_bulk_tail()
67 /* Move all cursors attached to a bulk move to its end */
68 static void ttm_bulk_move_adjust_cursors(struct ttm_lru_bulk_move *bulk) in ttm_bulk_move_adjust_cursors() argument
72 list_for_each_entry_safe(cursor, next, &bulk->cursor_list, bulk_link) in ttm_bulk_move_adjust_cursors()
73 ttm_resource_cursor_move_bulk_tail(bulk, cursor); in ttm_bulk_move_adjust_cursors()
76 /* Remove a cursor from an empty bulk move list */
77 static void ttm_bulk_move_drop_cursors(struct ttm_lru_bulk_move *bulk) in ttm_bulk_move_drop_cursors() argument
81 list_for_each_entry_safe(cursor, next, &bulk->cursor_list, bulk_link) in ttm_bulk_move_drop_cursors()
101 * ttm_lru_bulk_move_init - initialize a bulk move structure
102 * @bulk: the structure to init
106 void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk) in ttm_lru_bulk_move_init() argument
108 memset(bulk, 0, sizeof(*bulk)); in ttm_lru_bulk_move_init()
109 INIT_LIST_HEAD(&bulk->cursor_list); in ttm_lru_bulk_move_init()
114 * ttm_lru_bulk_move_fini - finalize a bulk move structure
116 * @bulk: the structure to finalize
118 * Sanity checks that bulk moves don't have any
122 struct ttm_lru_bulk_move *bulk) in ttm_lru_bulk_move_fini() argument
125 ttm_bulk_move_drop_cursors(bulk); in ttm_lru_bulk_move_fini()
131 * ttm_lru_bulk_move_tail - bulk move range of resources to the LRU tail.
133 * @bulk: bulk move structure
135 * Bulk move BOs to the LRU tail, only valid to use when driver makes sure that
138 void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk) in ttm_lru_bulk_move_tail() argument
142 ttm_bulk_move_adjust_cursors(bulk); in ttm_lru_bulk_move_tail()
145 struct ttm_lru_bulk_move_pos *pos = &bulk->pos[i][j]; in ttm_lru_bulk_move_tail()
163 /* Return the bulk move pos object for this resource */
165 ttm_lru_bulk_move_pos(struct ttm_lru_bulk_move *bulk, struct ttm_resource *res) in ttm_lru_bulk_move_pos() argument
167 return &bulk->pos[res->mem_type][res->bo->priority]; in ttm_lru_bulk_move_pos()
194 /* Move the resource to the tail of the bulk move range */
207 static void ttm_lru_bulk_move_add(struct ttm_lru_bulk_move *bulk, in ttm_lru_bulk_move_add() argument
210 struct ttm_lru_bulk_move_pos *pos = ttm_lru_bulk_move_pos(bulk, res); in ttm_lru_bulk_move_add()
222 static void ttm_lru_bulk_move_del(struct ttm_lru_bulk_move *bulk, in ttm_lru_bulk_move_del() argument
225 struct ttm_lru_bulk_move_pos *pos = ttm_lru_bulk_move_pos(bulk, res); in ttm_lru_bulk_move_del()
255 /* Add the resource to a bulk move if the BO is configured for it */
263 /* Remove the resource from a bulk move if the BO is configured for it */
271 /* Move a resource to the LRU or bulk tail */
595 struct ttm_lru_bulk_move *bulk = NULL; in ttm_resource_cursor_check_bulk() local
599 bulk = bo->bulk_move; in ttm_resource_cursor_check_bulk()
601 if (cursor->bulk != bulk) { in ttm_resource_cursor_check_bulk()
602 if (bulk) { in ttm_resource_cursor_check_bulk()
603 list_move_tail(&cursor->bulk_link, &bulk->cursor_list); in ttm_resource_cursor_check_bulk()
608 cursor->bulk = bulk; in ttm_resource_cursor_check_bulk()