Lines Matching full:ring

74 	/* Direct submission to the ring buffer during init and reset. */
97 /* sync_seq is protected by ring emission lock */
111 void amdgpu_fence_driver_force_completion(struct amdgpu_ring *ring);
113 int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
115 int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
120 int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **fence,
122 int amdgpu_fence_emit_polling(struct amdgpu_ring *ring, uint32_t *s,
124 bool amdgpu_fence_process(struct amdgpu_ring *ring);
125 int amdgpu_fence_wait_empty(struct amdgpu_ring *ring);
126 signed long amdgpu_fence_wait_polling(struct amdgpu_ring *ring,
129 unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring);
135 /* provided by hw blocks that expose a ring buffer for commands */
145 /* ring read/write ptr handling */
146 u64 (*get_rptr)(struct amdgpu_ring *ring);
147 u64 (*get_wptr)(struct amdgpu_ring *ring);
148 void (*set_wptr)(struct amdgpu_ring *ring);
156 void (*emit_ib)(struct amdgpu_ring *ring,
160 void (*emit_fence)(struct amdgpu_ring *ring, uint64_t addr,
162 void (*emit_pipeline_sync)(struct amdgpu_ring *ring);
163 void (*emit_vm_flush)(struct amdgpu_ring *ring, unsigned vmid,
165 void (*emit_hdp_flush)(struct amdgpu_ring *ring);
166 void (*emit_gds_switch)(struct amdgpu_ring *ring, uint32_t vmid,
171 int (*test_ring)(struct amdgpu_ring *ring);
172 int (*test_ib)(struct amdgpu_ring *ring, long timeout);
174 void (*insert_nop)(struct amdgpu_ring *ring, uint32_t count);
175 void (*insert_start)(struct amdgpu_ring *ring);
176 void (*insert_end)(struct amdgpu_ring *ring);
178 void (*pad_ib)(struct amdgpu_ring *ring, struct amdgpu_ib *ib);
179 unsigned (*init_cond_exec)(struct amdgpu_ring *ring);
180 void (*patch_cond_exec)(struct amdgpu_ring *ring, unsigned offset);
182 void (*begin_use)(struct amdgpu_ring *ring);
183 void (*end_use)(struct amdgpu_ring *ring);
184 void (*emit_switch_buffer) (struct amdgpu_ring *ring);
185 void (*emit_cntxcntl) (struct amdgpu_ring *ring, uint32_t flags);
186 void (*emit_rreg)(struct amdgpu_ring *ring, uint32_t reg,
188 void (*emit_wreg)(struct amdgpu_ring *ring, uint32_t reg, uint32_t val);
189 void (*emit_reg_wait)(struct amdgpu_ring *ring, uint32_t reg,
191 void (*emit_reg_write_reg_wait)(struct amdgpu_ring *ring,
194 void (*emit_frame_cntl)(struct amdgpu_ring *ring, bool start,
196 /* Try to soft recover the ring to make the fence signal */
197 void (*soft_recovery)(struct amdgpu_ring *ring, unsigned vmid);
198 int (*preempt_ib)(struct amdgpu_ring *ring);
199 void (*emit_mem_sync)(struct amdgpu_ring *ring);
209 volatile uint32_t *ring; member
281 int amdgpu_ring_alloc(struct amdgpu_ring *ring, unsigned ndw);
282 void amdgpu_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count);
283 void amdgpu_ring_generic_pad_ib(struct amdgpu_ring *ring, struct amdgpu_ib *ib);
284 void amdgpu_ring_commit(struct amdgpu_ring *ring);
285 void amdgpu_ring_undo(struct amdgpu_ring *ring);
286 int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
289 void amdgpu_ring_fini(struct amdgpu_ring *ring);
290 void amdgpu_ring_emit_reg_write_reg_wait_helper(struct amdgpu_ring *ring,
293 bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid,
296 static inline void amdgpu_ring_set_preempt_cond_exec(struct amdgpu_ring *ring, in amdgpu_ring_set_preempt_cond_exec() argument
299 *ring->cond_exe_cpu_addr = cond_exec; in amdgpu_ring_set_preempt_cond_exec()
302 static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring) in amdgpu_ring_clear_ring() argument
305 while (i <= ring->buf_mask) in amdgpu_ring_clear_ring()
306 ring->ring[i++] = ring->funcs->nop; in amdgpu_ring_clear_ring()
310 static inline void amdgpu_ring_write(struct amdgpu_ring *ring, uint32_t v) in amdgpu_ring_write() argument
312 if (ring->count_dw <= 0) in amdgpu_ring_write()
313 DRM_ERROR("amdgpu: writing more dwords to the ring than expected!\n"); in amdgpu_ring_write()
314 ring->ring[ring->wptr++ & ring->buf_mask] = v; in amdgpu_ring_write()
315 ring->wptr &= ring->ptr_mask; in amdgpu_ring_write()
316 ring->count_dw--; in amdgpu_ring_write()
319 static inline void amdgpu_ring_write_multiple(struct amdgpu_ring *ring, in amdgpu_ring_write_multiple() argument
325 if (unlikely(ring->count_dw < count_dw)) in amdgpu_ring_write_multiple()
326 DRM_ERROR("amdgpu: writing more dwords to the ring than expected!\n"); in amdgpu_ring_write_multiple()
328 occupied = ring->wptr & ring->buf_mask; in amdgpu_ring_write_multiple()
329 dst = (void *)&ring->ring[occupied]; in amdgpu_ring_write_multiple()
330 chunk1 = ring->buf_mask + 1 - occupied; in amdgpu_ring_write_multiple()
341 dst = (void *)ring->ring; in amdgpu_ring_write_multiple()
345 ring->wptr += count_dw; in amdgpu_ring_write_multiple()
346 ring->wptr &= ring->ptr_mask; in amdgpu_ring_write_multiple()
347 ring->count_dw -= count_dw; in amdgpu_ring_write_multiple()
350 int amdgpu_ring_test_helper(struct amdgpu_ring *ring);
353 struct amdgpu_ring *ring);
354 void amdgpu_debugfs_ring_fini(struct amdgpu_ring *ring);