Lines Matching refs:snapshot
1982 struct xe_guc_ct_snapshot *snapshot; in guc_ct_snapshot_alloc() local
1984 snapshot = kzalloc(sizeof(*snapshot), atomic ? GFP_ATOMIC : GFP_KERNEL); in guc_ct_snapshot_alloc()
1985 if (!snapshot) in guc_ct_snapshot_alloc()
1989 snapshot->ctb_size = xe_bo_size(ct->bo); in guc_ct_snapshot_alloc()
1990 snapshot->ctb = kmalloc(snapshot->ctb_size, atomic ? GFP_ATOMIC : GFP_KERNEL); in guc_ct_snapshot_alloc()
1993 return snapshot; in guc_ct_snapshot_alloc()
1997 struct guc_ctb_snapshot *snapshot) in guc_ctb_snapshot_capture() argument
1999 xe_map_memcpy_from(xe, &snapshot->desc, &ctb->desc, 0, in guc_ctb_snapshot_capture()
2001 memcpy(&snapshot->info, &ctb->info, sizeof(struct guc_ctb_info)); in guc_ctb_snapshot_capture()
2004 static void guc_ctb_snapshot_print(struct guc_ctb_snapshot *snapshot, in guc_ctb_snapshot_print() argument
2007 drm_printf(p, "\tsize: %d\n", snapshot->info.size); in guc_ctb_snapshot_print()
2008 drm_printf(p, "\tresv_space: %d\n", snapshot->info.resv_space); in guc_ctb_snapshot_print()
2009 drm_printf(p, "\thead: %d\n", snapshot->info.head); in guc_ctb_snapshot_print()
2010 drm_printf(p, "\ttail: %d\n", snapshot->info.tail); in guc_ctb_snapshot_print()
2011 drm_printf(p, "\tspace: %d\n", snapshot->info.space); in guc_ctb_snapshot_print()
2012 drm_printf(p, "\tbroken: %d\n", snapshot->info.broken); in guc_ctb_snapshot_print()
2013 drm_printf(p, "\thead (memory): %d\n", snapshot->desc.head); in guc_ctb_snapshot_print()
2014 drm_printf(p, "\ttail (memory): %d\n", snapshot->desc.tail); in guc_ctb_snapshot_print()
2015 drm_printf(p, "\tstatus (memory): 0x%x\n", snapshot->desc.status); in guc_ctb_snapshot_print()
2022 struct xe_guc_ct_snapshot *snapshot; in guc_ct_snapshot_capture() local
2024 snapshot = guc_ct_snapshot_alloc(ct, atomic, want_ctb); in guc_ct_snapshot_capture()
2025 if (!snapshot) { in guc_ct_snapshot_capture()
2031 snapshot->ct_enabled = true; in guc_ct_snapshot_capture()
2032 snapshot->g2h_outstanding = READ_ONCE(ct->g2h_outstanding); in guc_ct_snapshot_capture()
2033 guc_ctb_snapshot_capture(xe, &ct->ctbs.h2g, &snapshot->h2g); in guc_ct_snapshot_capture()
2034 guc_ctb_snapshot_capture(xe, &ct->ctbs.g2h, &snapshot->g2h); in guc_ct_snapshot_capture()
2037 if (ct->bo && snapshot->ctb) in guc_ct_snapshot_capture()
2038 xe_map_memcpy_from(xe, snapshot->ctb, &ct->bo->vmap, 0, snapshot->ctb_size); in guc_ct_snapshot_capture()
2040 return snapshot; in guc_ct_snapshot_capture()
2065 void xe_guc_ct_snapshot_print(struct xe_guc_ct_snapshot *snapshot, in xe_guc_ct_snapshot_print() argument
2068 if (!snapshot) in xe_guc_ct_snapshot_print()
2071 if (snapshot->ct_enabled) { in xe_guc_ct_snapshot_print()
2073 guc_ctb_snapshot_print(&snapshot->h2g, p); in xe_guc_ct_snapshot_print()
2076 guc_ctb_snapshot_print(&snapshot->g2h, p); in xe_guc_ct_snapshot_print()
2078 snapshot->g2h_outstanding); in xe_guc_ct_snapshot_print()
2080 if (snapshot->ctb) { in xe_guc_ct_snapshot_print()
2081 drm_printf(p, "[CTB].length: 0x%zx\n", snapshot->ctb_size); in xe_guc_ct_snapshot_print()
2083 snapshot->ctb, 0, snapshot->ctb_size); in xe_guc_ct_snapshot_print()
2097 void xe_guc_ct_snapshot_free(struct xe_guc_ct_snapshot *snapshot) in xe_guc_ct_snapshot_free() argument
2099 if (!snapshot) in xe_guc_ct_snapshot_free()
2102 kfree(snapshot->ctb); in xe_guc_ct_snapshot_free()
2103 kfree(snapshot); in xe_guc_ct_snapshot_free()
2117 struct xe_guc_ct_snapshot *snapshot; in xe_guc_ct_print() local
2119 snapshot = guc_ct_snapshot_capture(ct, false, want_ctb); in xe_guc_ct_print()
2120 xe_guc_ct_snapshot_print(snapshot, p); in xe_guc_ct_print()
2121 xe_guc_ct_snapshot_free(snapshot); in xe_guc_ct_print()