Lines Matching defs:h2g

192 static void guc_ct_ctb_h2g_init(struct xe_device *xe, struct guc_ctb *h2g,
195 h2g->info.size = CTB_H2G_BUFFER_SIZE / sizeof(u32);
196 h2g->info.resv_space = 0;
197 h2g->info.tail = 0;
198 h2g->info.head = 0;
199 h2g->info.space = CIRC_SPACE(h2g->info.tail, h2g->info.head,
200 h2g->info.size) -
201 h2g->info.resv_space;
202 h2g->info.broken = false;
204 h2g->desc = *map;
205 xe_map_memset(xe, &h2g->desc, 0, 0, sizeof(struct guc_ct_buffer_desc));
207 h2g->cmds = IOSYS_MAP_INIT_OFFSET(map, CTB_DESC_SIZE * 2);
237 size = ct->ctbs.h2g.info.size * sizeof(u32);
331 guc_ct_ctb_h2g_init(xe, &ct->ctbs.h2g, &ct->bo->vmap);
392 struct guc_ctb *h2g = &ct->ctbs.h2g;
396 if (cmd_len > h2g->info.space) {
397 h2g->info.head = desc_read(ct_to_xe(ct), h2g, head);
398 h2g->info.space = CIRC_SPACE(h2g->info.tail, h2g->info.head,
399 h2g->info.size) -
400 h2g->info.resv_space;
401 if (cmd_len > h2g->info.space)
431 ct->ctbs.h2g.info.space -= cmd_len;
470 struct guc_ctb *h2g = &ct->ctbs.h2g;
472 u32 tail = h2g->info.tail;
474 struct iosys_map map = IOSYS_MAP_INIT_OFFSET(&h2g->cmds,
481 xe_gt_assert(gt, tail <= h2g->info.size);
484 if (tail + full_len > h2g->info.size) {
486 (h2g->info.size - tail) * sizeof(u32));
487 h2g_reserve_space(ct, (h2g->info.size - tail));
488 h2g->info.tail = 0;
489 desc_write(xe, h2g, tail, h2g->info.tail);
524 h2g->info.tail = (tail + full_len) % h2g->info.size;
528 desc_write(xe, h2g, tail, h2g->info.tail);
531 desc_read(xe, h2g, head), h2g->info.tail);
570 if (unlikely(ct->ctbs.h2g.info.broken)) {
665 struct guc_ctb *h2g = &ct->ctbs.h2g;
670 trace_xe_guc_ct_h2g_flow_control(h2g->info.head, h2g->info.tail,
671 h2g->info.size,
672 h2g->info.space,
708 ct->ctbs.h2g.info.broken = true;
774 (xe_guc_ct_enabled(ct) && !ct->ctbs.h2g.info.broken && \
1412 guc_ctb_snapshot_capture(xe, &ct->ctbs.h2g,
1413 &snapshot->h2g, atomic);
1436 guc_ctb_snapshot_print(&snapshot->h2g, p);
1460 guc_ctb_snapshot_free(&snapshot->h2g);