Lines Matching refs:snapshot

1416 				     struct guc_ctb_snapshot *snapshot,  in guc_ctb_snapshot_capture()  argument
1421 xe_map_memcpy_from(xe, &snapshot->desc, &ctb->desc, 0, in guc_ctb_snapshot_capture()
1423 memcpy(&snapshot->info, &ctb->info, sizeof(struct guc_ctb_info)); in guc_ctb_snapshot_capture()
1425 snapshot->cmds = kmalloc_array(ctb->info.size, sizeof(u32), in guc_ctb_snapshot_capture()
1428 if (!snapshot->cmds) { in guc_ctb_snapshot_capture()
1433 head = snapshot->desc.head; in guc_ctb_snapshot_capture()
1434 tail = snapshot->desc.tail; in guc_ctb_snapshot_capture()
1441 snapshot->cmds[head] = xe_map_rd(xe, &map, 0, u32); in guc_ctb_snapshot_capture()
1453 static void guc_ctb_snapshot_print(struct guc_ctb_snapshot *snapshot, in guc_ctb_snapshot_print() argument
1458 drm_printf(p, "\tsize: %d\n", snapshot->info.size); in guc_ctb_snapshot_print()
1459 drm_printf(p, "\tresv_space: %d\n", snapshot->info.resv_space); in guc_ctb_snapshot_print()
1460 drm_printf(p, "\thead: %d\n", snapshot->info.head); in guc_ctb_snapshot_print()
1461 drm_printf(p, "\ttail: %d\n", snapshot->info.tail); in guc_ctb_snapshot_print()
1462 drm_printf(p, "\tspace: %d\n", snapshot->info.space); in guc_ctb_snapshot_print()
1463 drm_printf(p, "\tbroken: %d\n", snapshot->info.broken); in guc_ctb_snapshot_print()
1464 drm_printf(p, "\thead (memory): %d\n", snapshot->desc.head); in guc_ctb_snapshot_print()
1465 drm_printf(p, "\ttail (memory): %d\n", snapshot->desc.tail); in guc_ctb_snapshot_print()
1466 drm_printf(p, "\tstatus (memory): 0x%x\n", snapshot->desc.status); in guc_ctb_snapshot_print()
1468 if (!snapshot->cmds) in guc_ctb_snapshot_print()
1471 head = snapshot->desc.head; in guc_ctb_snapshot_print()
1472 tail = snapshot->desc.tail; in guc_ctb_snapshot_print()
1476 snapshot->cmds[head]); in guc_ctb_snapshot_print()
1478 if (head == snapshot->info.size) in guc_ctb_snapshot_print()
1483 static void guc_ctb_snapshot_free(struct guc_ctb_snapshot *snapshot) in guc_ctb_snapshot_free() argument
1485 kfree(snapshot->cmds); in guc_ctb_snapshot_free()
1504 struct xe_guc_ct_snapshot *snapshot; in xe_guc_ct_snapshot_capture() local
1506 snapshot = kzalloc(sizeof(*snapshot), in xe_guc_ct_snapshot_capture()
1509 if (!snapshot) { in xe_guc_ct_snapshot_capture()
1515 snapshot->ct_enabled = true; in xe_guc_ct_snapshot_capture()
1516 snapshot->g2h_outstanding = READ_ONCE(ct->g2h_outstanding); in xe_guc_ct_snapshot_capture()
1518 &snapshot->h2g, atomic); in xe_guc_ct_snapshot_capture()
1520 &snapshot->g2h, atomic); in xe_guc_ct_snapshot_capture()
1523 return snapshot; in xe_guc_ct_snapshot_capture()
1533 void xe_guc_ct_snapshot_print(struct xe_guc_ct_snapshot *snapshot, in xe_guc_ct_snapshot_print() argument
1536 if (!snapshot) in xe_guc_ct_snapshot_print()
1539 if (snapshot->ct_enabled) { in xe_guc_ct_snapshot_print()
1541 guc_ctb_snapshot_print(&snapshot->h2g, p); in xe_guc_ct_snapshot_print()
1544 guc_ctb_snapshot_print(&snapshot->g2h, p); in xe_guc_ct_snapshot_print()
1547 snapshot->g2h_outstanding); in xe_guc_ct_snapshot_print()
1560 void xe_guc_ct_snapshot_free(struct xe_guc_ct_snapshot *snapshot) in xe_guc_ct_snapshot_free() argument
1562 if (!snapshot) in xe_guc_ct_snapshot_free()
1565 guc_ctb_snapshot_free(&snapshot->h2g); in xe_guc_ct_snapshot_free()
1566 guc_ctb_snapshot_free(&snapshot->g2h); in xe_guc_ct_snapshot_free()
1567 kfree(snapshot); in xe_guc_ct_snapshot_free()
1581 struct xe_guc_ct_snapshot *snapshot; in xe_guc_ct_print() local
1583 snapshot = xe_guc_ct_snapshot_capture(ct, atomic); in xe_guc_ct_print()
1584 xe_guc_ct_snapshot_print(snapshot, p); in xe_guc_ct_print()
1585 xe_guc_ct_snapshot_free(snapshot); in xe_guc_ct_print()