Lines Matching refs:snapshot
2025 struct xe_guc_submit_exec_queue_snapshot *snapshot) in guc_exec_queue_wq_snapshot_capture() argument
2032 snapshot->guc.wqi_head = q->guc->wqi_head; in guc_exec_queue_wq_snapshot_capture()
2033 snapshot->guc.wqi_tail = q->guc->wqi_tail; in guc_exec_queue_wq_snapshot_capture()
2034 snapshot->parallel.wq_desc.head = parallel_read(xe, map, wq_desc.head); in guc_exec_queue_wq_snapshot_capture()
2035 snapshot->parallel.wq_desc.tail = parallel_read(xe, map, wq_desc.tail); in guc_exec_queue_wq_snapshot_capture()
2036 snapshot->parallel.wq_desc.status = parallel_read(xe, map, in guc_exec_queue_wq_snapshot_capture()
2039 if (snapshot->parallel.wq_desc.head != in guc_exec_queue_wq_snapshot_capture()
2040 snapshot->parallel.wq_desc.tail) { in guc_exec_queue_wq_snapshot_capture()
2041 for (i = snapshot->parallel.wq_desc.head; in guc_exec_queue_wq_snapshot_capture()
2042 i != snapshot->parallel.wq_desc.tail; in guc_exec_queue_wq_snapshot_capture()
2044 snapshot->parallel.wq[i / sizeof(u32)] = in guc_exec_queue_wq_snapshot_capture()
2050 guc_exec_queue_wq_snapshot_print(struct xe_guc_submit_exec_queue_snapshot *snapshot, in guc_exec_queue_wq_snapshot_print() argument
2056 snapshot->guc.wqi_head, snapshot->parallel.wq_desc.head); in guc_exec_queue_wq_snapshot_print()
2058 snapshot->guc.wqi_tail, snapshot->parallel.wq_desc.tail); in guc_exec_queue_wq_snapshot_print()
2059 drm_printf(p, "\tWQ status: %u\n", snapshot->parallel.wq_desc.status); in guc_exec_queue_wq_snapshot_print()
2061 if (snapshot->parallel.wq_desc.head != in guc_exec_queue_wq_snapshot_print()
2062 snapshot->parallel.wq_desc.tail) { in guc_exec_queue_wq_snapshot_print()
2063 for (i = snapshot->parallel.wq_desc.head; in guc_exec_queue_wq_snapshot_print()
2064 i != snapshot->parallel.wq_desc.tail; in guc_exec_queue_wq_snapshot_print()
2067 snapshot->parallel.wq[i / sizeof(u32)]); in guc_exec_queue_wq_snapshot_print()
2085 struct xe_guc_submit_exec_queue_snapshot *snapshot; in xe_guc_exec_queue_snapshot_capture() local
2088 snapshot = kzalloc(sizeof(*snapshot), GFP_ATOMIC); in xe_guc_exec_queue_snapshot_capture()
2090 if (!snapshot) in xe_guc_exec_queue_snapshot_capture()
2093 snapshot->guc.id = q->guc->id; in xe_guc_exec_queue_snapshot_capture()
2094 memcpy(&snapshot->name, &q->name, sizeof(snapshot->name)); in xe_guc_exec_queue_snapshot_capture()
2095 snapshot->class = q->class; in xe_guc_exec_queue_snapshot_capture()
2096 snapshot->logical_mask = q->logical_mask; in xe_guc_exec_queue_snapshot_capture()
2097 snapshot->width = q->width; in xe_guc_exec_queue_snapshot_capture()
2098 snapshot->refcount = kref_read(&q->refcount); in xe_guc_exec_queue_snapshot_capture()
2099 snapshot->sched_timeout = sched->base.timeout; in xe_guc_exec_queue_snapshot_capture()
2100 snapshot->sched_props.timeslice_us = q->sched_props.timeslice_us; in xe_guc_exec_queue_snapshot_capture()
2101 snapshot->sched_props.preempt_timeout_us = in xe_guc_exec_queue_snapshot_capture()
2104 snapshot->lrc = kmalloc_array(q->width, sizeof(struct xe_lrc_snapshot *), in xe_guc_exec_queue_snapshot_capture()
2107 if (snapshot->lrc) { in xe_guc_exec_queue_snapshot_capture()
2111 snapshot->lrc[i] = xe_lrc_snapshot_capture(lrc); in xe_guc_exec_queue_snapshot_capture()
2115 snapshot->schedule_state = atomic_read(&q->guc->state); in xe_guc_exec_queue_snapshot_capture()
2116 snapshot->exec_queue_flags = q->flags; in xe_guc_exec_queue_snapshot_capture()
2118 snapshot->parallel_execution = xe_exec_queue_is_parallel(q); in xe_guc_exec_queue_snapshot_capture()
2119 if (snapshot->parallel_execution) in xe_guc_exec_queue_snapshot_capture()
2120 guc_exec_queue_wq_snapshot_capture(q, snapshot); in xe_guc_exec_queue_snapshot_capture()
2123 snapshot->pending_list_size = list_count_nodes(&sched->base.pending_list); in xe_guc_exec_queue_snapshot_capture()
2124 snapshot->pending_list = kmalloc_array(snapshot->pending_list_size, in xe_guc_exec_queue_snapshot_capture()
2128 if (snapshot->pending_list) { in xe_guc_exec_queue_snapshot_capture()
2133 snapshot->pending_list[i].seqno = in xe_guc_exec_queue_snapshot_capture()
2135 snapshot->pending_list[i].fence = in xe_guc_exec_queue_snapshot_capture()
2137 snapshot->pending_list[i].finished = in xe_guc_exec_queue_snapshot_capture()
2146 return snapshot; in xe_guc_exec_queue_snapshot_capture()
2156 xe_guc_exec_queue_snapshot_capture_delayed(struct xe_guc_submit_exec_queue_snapshot *snapshot) in xe_guc_exec_queue_snapshot_capture_delayed() argument
2160 if (!snapshot || !snapshot->lrc) in xe_guc_exec_queue_snapshot_capture_delayed()
2163 for (i = 0; i < snapshot->width; ++i) in xe_guc_exec_queue_snapshot_capture_delayed()
2164 xe_lrc_snapshot_capture_delayed(snapshot->lrc[i]); in xe_guc_exec_queue_snapshot_capture_delayed()
2175 xe_guc_exec_queue_snapshot_print(struct xe_guc_submit_exec_queue_snapshot *snapshot, in xe_guc_exec_queue_snapshot_print() argument
2180 if (!snapshot) in xe_guc_exec_queue_snapshot_print()
2183 drm_printf(p, "\nGuC ID: %d\n", snapshot->guc.id); in xe_guc_exec_queue_snapshot_print()
2184 drm_printf(p, "\tName: %s\n", snapshot->name); in xe_guc_exec_queue_snapshot_print()
2185 drm_printf(p, "\tClass: %d\n", snapshot->class); in xe_guc_exec_queue_snapshot_print()
2186 drm_printf(p, "\tLogical mask: 0x%x\n", snapshot->logical_mask); in xe_guc_exec_queue_snapshot_print()
2187 drm_printf(p, "\tWidth: %d\n", snapshot->width); in xe_guc_exec_queue_snapshot_print()
2188 drm_printf(p, "\tRef: %d\n", snapshot->refcount); in xe_guc_exec_queue_snapshot_print()
2189 drm_printf(p, "\tTimeout: %ld (ms)\n", snapshot->sched_timeout); in xe_guc_exec_queue_snapshot_print()
2191 snapshot->sched_props.timeslice_us); in xe_guc_exec_queue_snapshot_print()
2193 snapshot->sched_props.preempt_timeout_us); in xe_guc_exec_queue_snapshot_print()
2195 for (i = 0; snapshot->lrc && i < snapshot->width; ++i) in xe_guc_exec_queue_snapshot_print()
2196 xe_lrc_snapshot_print(snapshot->lrc[i], p); in xe_guc_exec_queue_snapshot_print()
2198 drm_printf(p, "\tSchedule State: 0x%x\n", snapshot->schedule_state); in xe_guc_exec_queue_snapshot_print()
2199 drm_printf(p, "\tFlags: 0x%lx\n", snapshot->exec_queue_flags); in xe_guc_exec_queue_snapshot_print()
2201 if (snapshot->parallel_execution) in xe_guc_exec_queue_snapshot_print()
2202 guc_exec_queue_wq_snapshot_print(snapshot, p); in xe_guc_exec_queue_snapshot_print()
2204 for (i = 0; snapshot->pending_list && i < snapshot->pending_list_size; in xe_guc_exec_queue_snapshot_print()
2207 snapshot->pending_list[i].seqno, in xe_guc_exec_queue_snapshot_print()
2208 snapshot->pending_list[i].fence, in xe_guc_exec_queue_snapshot_print()
2209 snapshot->pending_list[i].finished); in xe_guc_exec_queue_snapshot_print()
2220 void xe_guc_exec_queue_snapshot_free(struct xe_guc_submit_exec_queue_snapshot *snapshot) in xe_guc_exec_queue_snapshot_free() argument
2224 if (!snapshot) in xe_guc_exec_queue_snapshot_free()
2227 if (snapshot->lrc) { in xe_guc_exec_queue_snapshot_free()
2228 for (i = 0; i < snapshot->width; i++) in xe_guc_exec_queue_snapshot_free()
2229 xe_lrc_snapshot_free(snapshot->lrc[i]); in xe_guc_exec_queue_snapshot_free()
2230 kfree(snapshot->lrc); in xe_guc_exec_queue_snapshot_free()
2232 kfree(snapshot->pending_list); in xe_guc_exec_queue_snapshot_free()
2233 kfree(snapshot); in xe_guc_exec_queue_snapshot_free()
2238 struct xe_guc_submit_exec_queue_snapshot *snapshot; in guc_exec_queue_print() local
2240 snapshot = xe_guc_exec_queue_snapshot_capture(q); in guc_exec_queue_print()
2241 xe_guc_exec_queue_snapshot_print(snapshot, p); in guc_exec_queue_print()
2242 xe_guc_exec_queue_snapshot_free(snapshot); in guc_exec_queue_print()