Lines Matching full:shadow
29 * a shadow BO that can be used for atomic updates to the primary BO's contents.
33 * primary and shadow BOs as needed.
40 /** @shadow: Shadow BO for atomic command updates. */
41 struct xe_bo *shadow; member
42 /** @swap_guard: Timeline guard updating @bo and @shadow */
74 struct xe_bo *shadow; in pool_shadow_init() local
77 xe_assert(xe, !pool->shadow); in pool_shadow_init()
88 shadow = xe_managed_bo_create_pin_map(xe, tile, in pool_shadow_init()
94 if (IS_ERR(shadow)) in pool_shadow_init()
95 return PTR_ERR(shadow); in pool_shadow_init()
97 pool->shadow = shadow; in pool_shadow_init()
108 * @flags: flags to use to create shadow pool.
112 * the CPU address space for direct access. Optionally, a shadow BO can also be
171 "Failed to initialize shadow BO for mem pool (%d)\n", ret); in xe_mem_pool_init()
178 * xe_mem_pool_sync() - Copy the entire contents of the main pool to shadow pool.
179 * @pool: the memory pool containing the primary and shadow BOs.
181 * Copies the entire contents of the primary pool to the shadow pool. This must
183 * flag to ensure that the shadow pool has the same initial contents as the primary
185 * shadow pool with the primary pool on a node basis using
195 xe_tile_assert(tile, pool->shadow); in xe_mem_pool_sync()
197 xe_map_memcpy_to(xe, &pool->shadow->vmap, 0, in xe_mem_pool_sync()
202 * xe_mem_pool_swap_shadow_locked() - Swap the primary BO with the shadow BO.
203 * @pool: the memory pool containing the primary and shadow BOs.
205 * Swaps the primary buffer object with the shadow buffer object in the mem
207 * by first writing to the shadow BO and then swapping it with the primary BO.
217 xe_tile_assert(tile, pool->shadow); in xe_mem_pool_swap_shadow_locked()
220 swap(pool->bo, pool->shadow); in xe_mem_pool_swap_shadow_locked()
226 * xe_mem_pool_sync_shadow_locked() - Copy node from primary pool to shadow pool.
229 * Copies the specified batch buffer from the primary pool to the shadow pool.
242 xe_tile_assert(tile, pool->shadow); in xe_mem_pool_sync_shadow_locked()
245 xe_map_memcpy_to(xe, &pool->shadow->vmap, in xe_mem_pool_sync_shadow_locked()
278 * Returns: Swap guard mutex or NULL if shadow pool is not created.
282 if (!pool->shadow) in xe_mem_pool_bo_swap_guard()