Lines Matching full:chunk

79 	struct amdgpu_mux_chunk *chunk;  in amdgpu_mux_resubmit_chunks()  local
103 list_for_each_entry(chunk, &e->list, entry) { in amdgpu_mux_resubmit_chunks()
104 if (chunk->sync_seq > last_seq && chunk->sync_seq <= seq) { in amdgpu_mux_resubmit_chunks()
106 chunk->sync_seq, in amdgpu_mux_resubmit_chunks()
108 if (chunk->sync_seq == in amdgpu_mux_resubmit_chunks()
110 if (chunk->cntl_offset <= e->ring->buf_mask) in amdgpu_mux_resubmit_chunks()
112 chunk->cntl_offset); in amdgpu_mux_resubmit_chunks()
113 if (chunk->ce_offset <= e->ring->buf_mask) in amdgpu_mux_resubmit_chunks()
114 amdgpu_ring_patch_ce(e->ring, chunk->ce_offset); in amdgpu_mux_resubmit_chunks()
115 if (chunk->de_offset <= e->ring->buf_mask) in amdgpu_mux_resubmit_chunks()
116 amdgpu_ring_patch_de(e->ring, chunk->de_offset); in amdgpu_mux_resubmit_chunks()
119 chunk->start, in amdgpu_mux_resubmit_chunks()
120 chunk->end); in amdgpu_mux_resubmit_chunks()
121 mux->wptr_resubmit = chunk->end; in amdgpu_mux_resubmit_chunks()
177 struct amdgpu_mux_chunk *chunk, *chunk2; in amdgpu_ring_mux_fini() local
182 list_for_each_entry_safe(chunk, chunk2, &e->list, entry) { in amdgpu_ring_mux_fini()
183 list_del(&chunk->entry); in amdgpu_ring_mux_fini()
184 kmem_cache_free(amdgpu_mux_chunk_slab, chunk); in amdgpu_ring_mux_fini()
435 struct amdgpu_mux_chunk *chunk; in amdgpu_ring_mux_start_ib() local
447 chunk = kmem_cache_alloc(amdgpu_mux_chunk_slab, GFP_KERNEL); in amdgpu_ring_mux_start_ib()
448 if (!chunk) { in amdgpu_ring_mux_start_ib()
453 chunk->start = ring->wptr; in amdgpu_ring_mux_start_ib()
455 chunk->cntl_offset = ring->buf_mask + 1; in amdgpu_ring_mux_start_ib()
456 chunk->de_offset = ring->buf_mask + 1; in amdgpu_ring_mux_start_ib()
457 chunk->ce_offset = ring->buf_mask + 1; in amdgpu_ring_mux_start_ib()
458 list_add_tail(&chunk->entry, &e->list); in amdgpu_ring_mux_start_ib()
465 struct amdgpu_mux_chunk *chunk, *tmp; in scan_and_remove_signaled_chunk() local
475 list_for_each_entry_safe(chunk, tmp, &e->list, entry) { in scan_and_remove_signaled_chunk()
476 if (chunk->sync_seq <= last_seq) { in scan_and_remove_signaled_chunk()
477 list_del(&chunk->entry); in scan_and_remove_signaled_chunk()
478 kmem_cache_free(amdgpu_mux_chunk_slab, chunk); in scan_and_remove_signaled_chunk()
488 struct amdgpu_mux_chunk *chunk; in amdgpu_ring_mux_ib_mark_offset() local
496 chunk = list_last_entry(&e->list, struct amdgpu_mux_chunk, entry); in amdgpu_ring_mux_ib_mark_offset()
497 if (!chunk) { in amdgpu_ring_mux_ib_mark_offset()
498 DRM_ERROR("cannot find chunk!\n"); in amdgpu_ring_mux_ib_mark_offset()
504 chunk->cntl_offset = offset; in amdgpu_ring_mux_ib_mark_offset()
507 chunk->de_offset = offset; in amdgpu_ring_mux_ib_mark_offset()
510 chunk->ce_offset = offset; in amdgpu_ring_mux_ib_mark_offset()
521 struct amdgpu_mux_chunk *chunk; in amdgpu_ring_mux_end_ib() local
529 chunk = list_last_entry(&e->list, struct amdgpu_mux_chunk, entry); in amdgpu_ring_mux_end_ib()
530 if (!chunk) { in amdgpu_ring_mux_end_ib()
531 DRM_ERROR("cannot find chunk!\n"); in amdgpu_ring_mux_end_ib()
535 chunk->end = ring->wptr; in amdgpu_ring_mux_end_ib()
536 chunk->sync_seq = READ_ONCE(ring->fence_drv.sync_seq); in amdgpu_ring_mux_end_ib()