Lines Matching refs:snapshot
1647 struct xe_lrc_snapshot *snapshot = kmalloc(sizeof(*snapshot), GFP_NOWAIT); in xe_lrc_snapshot_capture() local
1649 if (!snapshot) in xe_lrc_snapshot_capture()
1655 snapshot->context_desc = xe_lrc_ggtt_addr(lrc); in xe_lrc_snapshot_capture()
1656 snapshot->indirect_context_desc = xe_lrc_indirect_ring_ggtt_addr(lrc); in xe_lrc_snapshot_capture()
1657 snapshot->head = xe_lrc_ring_head(lrc); in xe_lrc_snapshot_capture()
1658 snapshot->tail.internal = lrc->ring.tail; in xe_lrc_snapshot_capture()
1659 snapshot->tail.memory = xe_lrc_ring_tail(lrc); in xe_lrc_snapshot_capture()
1660 snapshot->start_seqno = xe_lrc_start_seqno(lrc); in xe_lrc_snapshot_capture()
1661 snapshot->seqno = xe_lrc_seqno(lrc); in xe_lrc_snapshot_capture()
1662 snapshot->lrc_bo = xe_bo_get(lrc->bo); in xe_lrc_snapshot_capture()
1663 snapshot->lrc_offset = xe_lrc_pphwsp_offset(lrc); in xe_lrc_snapshot_capture()
1664 snapshot->lrc_size = lrc->bo->size - snapshot->lrc_offset; in xe_lrc_snapshot_capture()
1665 snapshot->lrc_snapshot = NULL; in xe_lrc_snapshot_capture()
1666 snapshot->ctx_timestamp = xe_lrc_ctx_timestamp(lrc); in xe_lrc_snapshot_capture()
1667 snapshot->ctx_job_timestamp = xe_lrc_ctx_job_timestamp(lrc); in xe_lrc_snapshot_capture()
1668 return snapshot; in xe_lrc_snapshot_capture()
1671 void xe_lrc_snapshot_capture_delayed(struct xe_lrc_snapshot *snapshot) in xe_lrc_snapshot_capture_delayed() argument
1677 if (!snapshot) in xe_lrc_snapshot_capture_delayed()
1680 bo = snapshot->lrc_bo; in xe_lrc_snapshot_capture_delayed()
1682 snapshot->lrc_bo = NULL; in xe_lrc_snapshot_capture_delayed()
1684 snapshot->lrc_snapshot = kvmalloc(snapshot->lrc_size, GFP_KERNEL); in xe_lrc_snapshot_capture_delayed()
1685 if (!snapshot->lrc_snapshot) in xe_lrc_snapshot_capture_delayed()
1691 snapshot->lrc_snapshot, &src, snapshot->lrc_offset, in xe_lrc_snapshot_capture_delayed()
1692 snapshot->lrc_size); in xe_lrc_snapshot_capture_delayed()
1695 kvfree(snapshot->lrc_snapshot); in xe_lrc_snapshot_capture_delayed()
1696 snapshot->lrc_snapshot = NULL; in xe_lrc_snapshot_capture_delayed()
1705 void xe_lrc_snapshot_print(struct xe_lrc_snapshot *snapshot, struct drm_printer *p) in xe_lrc_snapshot_print() argument
1709 if (!snapshot) in xe_lrc_snapshot_print()
1712 drm_printf(p, "\tHW Context Desc: 0x%08x\n", snapshot->context_desc); in xe_lrc_snapshot_print()
1714 snapshot->indirect_context_desc); in xe_lrc_snapshot_print()
1715 drm_printf(p, "\tLRC Head: (memory) %u\n", snapshot->head); in xe_lrc_snapshot_print()
1717 snapshot->tail.internal, snapshot->tail.memory); in xe_lrc_snapshot_print()
1718 drm_printf(p, "\tStart seqno: (memory) %d\n", snapshot->start_seqno); in xe_lrc_snapshot_print()
1719 drm_printf(p, "\tSeqno: (memory) %d\n", snapshot->seqno); in xe_lrc_snapshot_print()
1720 drm_printf(p, "\tTimestamp: 0x%08x\n", snapshot->ctx_timestamp); in xe_lrc_snapshot_print()
1721 drm_printf(p, "\tJob Timestamp: 0x%08x\n", snapshot->ctx_job_timestamp); in xe_lrc_snapshot_print()
1723 if (!snapshot->lrc_snapshot) in xe_lrc_snapshot_print()
1729 u32 *val = snapshot->lrc_snapshot + i; in xe_lrc_snapshot_print()
1735 drm_printf(p, "\n\t[HWCTX].length: 0x%lx\n", snapshot->lrc_size - LRC_PPHWSP_SIZE); in xe_lrc_snapshot_print()
1737 for (; i < snapshot->lrc_size; i += sizeof(u32)) { in xe_lrc_snapshot_print()
1738 u32 *val = snapshot->lrc_snapshot + i; in xe_lrc_snapshot_print()
1746 void xe_lrc_snapshot_free(struct xe_lrc_snapshot *snapshot) in xe_lrc_snapshot_free() argument
1748 if (!snapshot) in xe_lrc_snapshot_free()
1751 kvfree(snapshot->lrc_snapshot); in xe_lrc_snapshot_free()
1752 if (snapshot->lrc_bo) { in xe_lrc_snapshot_free()
1755 vm = snapshot->lrc_bo->vm; in xe_lrc_snapshot_free()
1756 xe_bo_put(snapshot->lrc_bo); in xe_lrc_snapshot_free()
1760 kfree(snapshot); in xe_lrc_snapshot_free()