Lines Matching refs:xe

27 int xe_bo_evict_all(struct xe_device *xe)  in xe_bo_evict_all()  argument
29 struct ttm_device *bdev = &xe->ttm; in xe_bo_evict_all()
50 if (mem_type == XE_PL_TT && (IS_DGFX(xe) || !xe_device_has_flat_ccs(xe))) in xe_bo_evict_all()
62 spin_lock(&xe->pinned.lock); in xe_bo_evict_all()
64 bo = list_first_entry_or_null(&xe->pinned.external_vram, in xe_bo_evict_all()
70 spin_unlock(&xe->pinned.lock); in xe_bo_evict_all()
77 spin_lock(&xe->pinned.lock); in xe_bo_evict_all()
79 &xe->pinned.external_vram); in xe_bo_evict_all()
80 spin_unlock(&xe->pinned.lock); in xe_bo_evict_all()
84 spin_lock(&xe->pinned.lock); in xe_bo_evict_all()
86 list_splice_tail(&still_in_list, &xe->pinned.external_vram); in xe_bo_evict_all()
87 spin_unlock(&xe->pinned.lock); in xe_bo_evict_all()
93 for_each_tile(tile, xe, id) in xe_bo_evict_all()
96 spin_lock(&xe->pinned.lock); in xe_bo_evict_all()
98 bo = list_first_entry_or_null(&xe->pinned.kernel_bo_present, in xe_bo_evict_all()
103 list_move_tail(&bo->pinned_link, &xe->pinned.evicted); in xe_bo_evict_all()
104 spin_unlock(&xe->pinned.lock); in xe_bo_evict_all()
113 spin_lock(&xe->pinned.lock); in xe_bo_evict_all()
115 spin_unlock(&xe->pinned.lock); in xe_bo_evict_all()
131 int xe_bo_restore_kernel(struct xe_device *xe) in xe_bo_restore_kernel() argument
136 spin_lock(&xe->pinned.lock); in xe_bo_restore_kernel()
138 bo = list_first_entry_or_null(&xe->pinned.evicted, in xe_bo_restore_kernel()
143 list_move_tail(&bo->pinned_link, &xe->pinned.kernel_bo_present); in xe_bo_restore_kernel()
144 spin_unlock(&xe->pinned.lock); in xe_bo_restore_kernel()
158 for_each_tile(tile, xe, id) { in xe_bo_restore_kernel()
172 xe_assert(xe, !iosys_map_is_null(&bo->vmap)); in xe_bo_restore_kernel()
176 spin_lock(&xe->pinned.lock); in xe_bo_restore_kernel()
178 spin_unlock(&xe->pinned.lock); in xe_bo_restore_kernel()
193 int xe_bo_restore_user(struct xe_device *xe) in xe_bo_restore_user() argument
201 if (!IS_DGFX(xe)) in xe_bo_restore_user()
206 spin_lock(&xe->pinned.lock); in xe_bo_restore_user()
208 bo = list_first_entry_or_null(&xe->pinned.external_vram, in xe_bo_restore_user()
214 spin_unlock(&xe->pinned.lock); in xe_bo_restore_user()
221 spin_lock(&xe->pinned.lock); in xe_bo_restore_user()
223 &xe->pinned.external_vram); in xe_bo_restore_user()
224 spin_unlock(&xe->pinned.lock); in xe_bo_restore_user()
228 spin_lock(&xe->pinned.lock); in xe_bo_restore_user()
230 list_splice_tail(&still_in_list, &xe->pinned.external_vram); in xe_bo_restore_user()
231 spin_unlock(&xe->pinned.lock); in xe_bo_restore_user()
234 for_each_tile(tile, xe, id) in xe_bo_restore_user()