Lines Matching refs:msm_ring

93 	struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring);  in append_bo()  local
96 idx = APPEND(&msm_ring->submit, bos); in append_bo()
97 idx = APPEND(msm_ring, bos); in append_bo()
99 msm_ring->submit.bos[idx].flags = 0; in append_bo()
100 msm_ring->submit.bos[idx].handle = bo->handle; in append_bo()
101 msm_ring->submit.bos[idx].presumed = to_msm_bo(bo)->presumed; in append_bo()
103 msm_ring->bos[idx] = fd_bo_ref(bo); in append_bo()
111 struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring); in bo2idx() local
123 for (idx = 0; idx < msm_ring->nr_bos; idx++) in bo2idx()
124 if (msm_ring->bos[idx] == bo) in bo2idx()
126 if (idx == msm_ring->nr_bos) { in bo2idx()
133 msm_ring->submit.bos[idx].flags |= MSM_SUBMIT_BO_READ; in bo2idx()
135 msm_ring->submit.bos[idx].flags |= MSM_SUBMIT_BO_WRITE; in bo2idx()
142 struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring); in check_cmd_bo() local
143 return msm_ring->submit.bos[cmd->submit_idx].handle == bo->handle; in check_cmd_bo()
155 struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring); in get_cmd() local
160 for (i = 0; i < msm_ring->submit.nr_cmds; i++) { in get_cmd()
161 cmd = &msm_ring->submit.cmds[i]; in get_cmd()
172 uint32_t idx = APPEND(&msm_ring->submit, cmds); in get_cmd()
173 APPEND(msm_ring, rings); in get_cmd()
174 msm_ring->rings[idx] = target_ring; in get_cmd()
175 cmd = &msm_ring->submit.cmds[idx]; in get_cmd()
188 struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring); in msm_ringbuffer_hostptr() local
189 return fd_bo_map(msm_ring->ring_bo); in msm_ringbuffer_hostptr()
192 static uint32_t find_next_reloc_idx(struct msm_ringbuffer *msm_ring, in find_next_reloc_idx() argument
198 for (i = start; i < msm_ring->submit.nr_relocs; i++) { in find_next_reloc_idx()
199 struct drm_msm_gem_submit_reloc *reloc = &msm_ring->submit.relocs[i]; in find_next_reloc_idx()
209 struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring); in flush_reset() local
213 for (i = 0; i < msm_ring->submit.nr_cmds; i++) { in flush_reset()
214 struct msm_ringbuffer *target_ring = to_msm_ringbuffer(msm_ring->rings[i]); in flush_reset()
218 msm_ring->submit.nr_relocs = 0; in flush_reset()
219 msm_ring->submit.nr_cmds = 0; in flush_reset()
220 msm_ring->submit.nr_bos = 0; in flush_reset()
221 msm_ring->nr_rings = 0; in flush_reset()
222 msm_ring->nr_bos = 0; in flush_reset()
227 struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring); in msm_ringbuffer_flush() local
228 struct fd_bo *ring_bo = msm_ring->ring_bo; in msm_ringbuffer_flush()
241 req.bos = VOID2U64(msm_ring->submit.bos), in msm_ringbuffer_flush()
242 req.nr_bos = msm_ring->submit.nr_bos; in msm_ringbuffer_flush()
243 req.cmds = VOID2U64(msm_ring->submit.cmds), in msm_ringbuffer_flush()
244 req.nr_cmds = msm_ring->submit.nr_cmds; in msm_ringbuffer_flush()
247 for (i = 0; i < msm_ring->submit.nr_cmds; i++) { in msm_ringbuffer_flush()
248 struct drm_msm_gem_submit_cmd *cmd = &msm_ring->submit.cmds[i]; in msm_ringbuffer_flush()
249 struct msm_ringbuffer *target_ring = to_msm_ringbuffer(msm_ring->rings[i]); in msm_ringbuffer_flush()
263 for (i = 0; i < msm_ring->submit.nr_bos; i++) { in msm_ringbuffer_flush()
264 struct drm_msm_gem_submit_bo *bo = &msm_ring->submit.bos[i]; in msm_ringbuffer_flush()
267 for (i = 0; i < msm_ring->submit.nr_cmds; i++) { in msm_ringbuffer_flush()
268 struct drm_msm_gem_submit_cmd *cmd = &msm_ring->submit.cmds[i]; in msm_ringbuffer_flush()
281 for (i = 0; i < msm_ring->submit.nr_cmds; i++) { in msm_ringbuffer_flush()
282 struct fd_ringbuffer *target_ring = msm_ring->rings[i]; in msm_ringbuffer_flush()
288 for (i = 0; i < msm_ring->nr_bos; i++) { in msm_ringbuffer_flush()
289 struct msm_bo *msm_bo = to_msm_bo(msm_ring->bos[i]); in msm_ringbuffer_flush()
307 struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring); in msm_ringbuffer_emit_reloc() local
311 uint32_t idx = APPEND(&msm_ring->submit, relocs); in msm_ringbuffer_emit_reloc()
314 reloc = &msm_ring->submit.relocs[idx]; in msm_ringbuffer_emit_reloc()
353 struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring); in msm_ringbuffer_destroy() local
354 if (msm_ring->ring_bo) in msm_ringbuffer_destroy()
355 fd_bo_del(msm_ring->ring_bo); in msm_ringbuffer_destroy()
356 free(msm_ring); in msm_ringbuffer_destroy()
371 struct msm_ringbuffer *msm_ring; in msm_ringbuffer_new() local
374 msm_ring = calloc(1, sizeof(*msm_ring)); in msm_ringbuffer_new()
375 if (!msm_ring) { in msm_ringbuffer_new()
380 ring = &msm_ring->base; in msm_ringbuffer_new()
383 msm_ring->ring_bo = fd_bo_new(pipe->dev, size, 0); in msm_ringbuffer_new()
384 if (!msm_ring->ring_bo) { in msm_ringbuffer_new()