Lines Matching full:capture
46 * as we extract error capture data from the GuC-log-buffer's
47 * error-capture region as a stream of dwords.
57 * struct __guc_capture_parsed_output - extracted error capture node
59 * A single unit of extracted error-capture output data grouped together
65 * A single set of 3 capture lists: a global-list
91 * Define all device tables of GuC error capture register lists
329 reglists = guc->capture->extlists; in xe_guc_capture_get_reg_desc_list()
401 const struct __guc_mmio_reg_descr_group *lists = guc->capture->reglists; in guc_capture_alloc_steered_lists()
436 if (!list || guc->capture->extlists) in guc_capture_alloc_steered_lists()
472 xe_gt_dbg(guc_to_gt(guc), "capture found %d ext-regs.\n", total); in guc_capture_alloc_steered_lists()
473 guc->capture->extlists = extlists; in guc_capture_alloc_steered_lists()
482 const struct __guc_mmio_reg_descr_group *reglists = guc->capture->reglists; in guc_capture_list_init()
483 struct __guc_mmio_reg_descr_group *extlists = guc->capture->extlists; in guc_capture_list_init()
514 xe_gt_dbg(guc_to_gt(guc), "Got short capture reglist init: %d out-of %d.\n", in guc_capture_list_init()
527 match = guc_capture_get_one_list(guc->capture->reglists, owner, type, capture_class); in guc_cap_list_num_regs()
531 match = guc_capture_get_one_list(guc->capture->extlists, owner, type, capture_class); in guc_cap_list_num_regs()
545 !guc->capture->max_mmio_per_node) in guc_cap_list_num_regs()
557 struct xe_guc_state_capture *gc = guc->capture; in guc_capture_getlistsize()
567 xe_gt_warn(gt, "No capture reglist for this device\n"); in guc_capture_getlistsize()
579 xe_gt_warn(gt, "Missing capture reglist: global!\n"); in guc_capture_getlistsize()
581 xe_gt_warn(gt, "Missing capture reglist: %s(%u):%s(%u)!\n", in guc_capture_getlistsize()
603 * @type: GuC capture register type
604 * @capture_class: GuC capture engine class id
620 * xe_guc_capture_getlist - Get register capture list for owner/type/class
624 * @type: GuC capture register type
625 * @capture_class: GuC capture engine class id
626 * @outptr: Point to cached register capture list
628 * This function will get the register capture list for the owner/type/class
637 struct xe_guc_state_capture *gc = guc->capture; in xe_guc_capture_getlist()
665 /* populate capture list header */ in xe_guc_capture_getlist()
688 * xe_guc_capture_getnullheader - Get a null list for register capture
690 * @outptr: Point to cached register capture list
693 * This function will alloc for a null list for register capture.
700 struct xe_guc_state_capture *gc = guc->capture; in xe_guc_capture_getnullheader()
722 * xe_guc_capture_ads_input_worst_size - Calculate the worst size for GuC register capture
725 * Calculate the worst size for GuC register capture by including all possible engines classes.
773 if (!guc->capture) in guc_capture_output_size_est()
778 * were all unrelated, then a burst of multiple error-capture events would dump in guc_capture_output_size_est()
821 * NOTE: capture_size is much smaller than the capture region in check_guc_capture_size()
827 * G2H event capture-notification, search for: in check_guc_capture_size()
832 "Failed to calculate error state capture buffer minimum size: %d!\n", in check_guc_capture_size()
835 xe_gt_dbg(guc_to_gt(guc), "Error state capture buffer maybe small: %d < %d\n", in check_guc_capture_size()
839 "Error state capture buffer lacks spare size: %d < %d (min = %d)\n", in check_guc_capture_size()
899 guc->capture->max_mmio_per_node); in guc_capture_init_node()
909 * DOC: Init, G2H-event and reporting flows for GuC-error-capture
913 * --> alloc A: GuC input capture regs lists (registered to GuC via ADS).
923 * --> alloc B: GuC output capture buf (registered via guc_init_params(log_param))
925 * Note2: 'x 3' to hold multiple capture groups
927 * GUC Runtime notify capture:
933 * --> alloc C: A capture-output-node structure that includes misc capture info along
936 * guc->capture->cachelist and populated with the error-capture
937 * data from GuC and then it's added into guc->capture->outlist linked
947 * --> xe_engine_manual_capture(For manual capture)
955 * guc->capture->outlist
974 * GuC's error-capture output is a ring buffer populated in a byte-stream fashion:
976 * The GuC Log buffer region for error-capture is managed like a ring buffer.
977 * The GuC firmware dumps error capture logs into this ring in a byte-stream flow.
979 * capture output structures are dword aligned.
982 * than one dword but the tail end of the err-capture buffer-region has lesser space left,
1075 if (!list_empty(&guc->capture->cachelist)) { in guc_capture_get_prealloc_node()
1079 list_for_each_entry_safe(n, ntmp, &guc->capture->cachelist, link) { in guc_capture_get_prealloc_node()
1090 list_for_each_entry_safe_reverse(n, ntmp, &guc->capture->outlist, link) { in guc_capture_get_prealloc_node()
1122 guc->capture->max_mmio_per_node); in guc_capture_clone_node()
1161 xe_gt_warn(gt, "Got mis-aligned register capture entries\n"); in guc_capture_extract_reglists()
1166 /* first get the capture group header */ in guc_capture_extract_reglists()
1176 * | Capture Group | in guc_capture_extract_reglists()
1178 * | | Capture Group Header: | | in guc_capture_extract_reglists()
1234 /* unknown capture type - skip over to next capture set */ in guc_capture_extract_reglists()
1246 * Based on the current capture type and what we have so far, in guc_capture_extract_reglists()
1255 guc_capture_add_node_to_outlist(guc->capture, node); in guc_capture_extract_reglists()
1260 guc_capture_add_node_to_outlist(guc->capture, node); in guc_capture_extract_reglists()
1266 guc_capture_add_node_to_outlist(guc->capture, node); in guc_capture_extract_reglists()
1280 xe_gt_dbg(gt, "Register capture missing global dump: %08x!\n", in guc_capture_extract_reglists()
1307 if (numregs > guc->capture->max_mmio_per_node) { in guc_capture_extract_reglists()
1308 xe_gt_dbg(gt, "Register capture list extraction clipped by prealloc!\n"); in guc_capture_extract_reglists()
1309 numregs = guc->capture->max_mmio_per_node; in guc_capture_extract_reglists()
1327 guc_capture_add_node_to_outlist(guc->capture, node); in guc_capture_extract_reglists()
1333 guc_capture_add_node_to_cachelist(guc->capture, node); in guc_capture_extract_reglists()
1389 "Register capture buffer in invalid state: read = 0x%X, size = 0x%X!\n", in __guc_capture_process_output()
1405 xe_gt_dbg(guc_to_gt(guc), "Capture extraction failed:%d\n", ret); in __guc_capture_process_output()
1438 if (guc->capture) in xe_guc_capture_process()
1454 new->reginfo[i].regs = drmm_kzalloc(drm, guc->capture->max_mmio_per_node * in guc_capture_alloc_one_node()
1477 xe_gt_warn(guc_to_gt(guc), "Register capture pre-alloc-cache failure\n"); in __guc_capture_create_prealloc_nodes()
1481 guc_capture_add_node_to_cachelist(guc->capture, node); in __guc_capture_create_prealloc_nodes()
1499 match = guc_capture_get_one_list(guc->capture->reglists, i, j, k); in guc_get_max_reglist_count()
1503 match = guc_capture_get_one_list(guc->capture->extlists, i, j, k); in guc_get_max_reglist_count()
1522 if (guc->capture->max_mmio_per_node) in guc_capture_create_prealloc_nodes()
1525 guc->capture->max_mmio_per_node = guc_get_max_reglist_count(guc); in guc_capture_create_prealloc_nodes()
1602 * regsinfo->regs is allocated based on guc->capture->max_mmio_per_node in xe_engine_manual_capture()
1611 xe_gt_dbg(gt, "Empty GuC capture register descriptor for %s", in xe_engine_manual_capture()
1619 /* Capture steering registers for rcs/ccs */ in xe_engine_manual_capture()
1648 guc_capture_add_node_to_outlist(guc->capture, new); in xe_engine_manual_capture()
1686 is_ext = list == guc->capture->extlists; in snapshot_print_by_list_order()
1786 "full-capture", in xe_engine_snapshot_print()
1787 "partial-capture" in xe_engine_snapshot_print()
1843 * xe_guc_capture_get_matching_and_lock - Matching GuC capture for the queue.
1846 * Search within the capture outlist for the queue, could be used for check if
1847 * GuC capture is ready for the queue.
1850 * Returns: found guc-capture node ptr else NULL
1887 * Look for a matching GuC reported error capture node from in xe_guc_capture_get_matching_and_lock()
1891 list_for_each_entry_safe(n, ntmp, &guc->capture->outlist, link) { in xe_guc_capture_get_matching_and_lock()
1942 * GuC-err-capture node for this engine after in xe_engine_snapshot_capture_for_queue()
1947 guc_capture_free_outlist_node(guc->capture, in xe_engine_snapshot_capture_for_queue()
1971 guc_capture_remove_stale_matches_from_list(guc->capture, n); in xe_guc_capture_put_matched_nodes()
1972 guc_capture_free_outlist_node(guc->capture, n); in xe_guc_capture_put_matched_nodes()
1981 * Init steering register list for GuC register capture, create pre-alloc node
1997 * xe_guc_capture_init - Init for GuC register capture
2000 * Init for GuC register capture, alloc memory for capture data structure.
2007 guc->capture = drmm_kzalloc(guc_to_drm(guc), sizeof(*guc->capture), GFP_KERNEL); in xe_guc_capture_init()
2008 if (!guc->capture) in xe_guc_capture_init()
2011 guc->capture->reglists = guc_capture_get_device_reglist(guc_to_xe(guc)); in xe_guc_capture_init()
2013 INIT_LIST_HEAD(&guc->capture->outlist); in xe_guc_capture_init()
2014 INIT_LIST_HEAD(&guc->capture->cachelist); in xe_guc_capture_init()