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()
402 const struct __guc_mmio_reg_descr_group *lists = guc->capture->reglists; in guc_capture_alloc_steered_lists()
437 if (!list || guc->capture->extlists) in guc_capture_alloc_steered_lists()
473 xe_gt_dbg(guc_to_gt(guc), "capture found %d ext-regs.\n", total); in guc_capture_alloc_steered_lists()
474 guc->capture->extlists = extlists; in guc_capture_alloc_steered_lists()
483 const struct __guc_mmio_reg_descr_group *reglists = guc->capture->reglists; in guc_capture_list_init()
484 struct __guc_mmio_reg_descr_group *extlists = guc->capture->extlists; in guc_capture_list_init()
515 xe_gt_dbg(guc_to_gt(guc), "Got short capture reglist init: %d out-of %d.\n", in guc_capture_list_init()
528 match = guc_capture_get_one_list(guc->capture->reglists, owner, type, capture_class); in guc_cap_list_num_regs()
532 match = guc_capture_get_one_list(guc->capture->extlists, owner, type, capture_class); in guc_cap_list_num_regs()
546 !guc->capture->max_mmio_per_node) in guc_cap_list_num_regs()
558 struct xe_guc_state_capture *gc = guc->capture; in guc_capture_getlistsize()
568 xe_gt_warn(gt, "No capture reglist for this device\n"); in guc_capture_getlistsize()
580 xe_gt_warn(gt, "Missing capture reglist: global!\n"); in guc_capture_getlistsize()
582 xe_gt_warn(gt, "Missing capture reglist: %s(%u):%s(%u)!\n", in guc_capture_getlistsize()
604 * @type: GuC capture register type
605 * @capture_class: GuC capture engine class id
621 * xe_guc_capture_getlist - Get register capture list for owner/type/class
625 * @type: GuC capture register type
626 * @capture_class: GuC capture engine class id
627 * @outptr: Point to cached register capture list
629 * This function will get the register capture list for the owner/type/class
638 struct xe_guc_state_capture *gc = guc->capture; in xe_guc_capture_getlist()
666 /* populate capture list header */ in xe_guc_capture_getlist()
689 * xe_guc_capture_getnullheader - Get a null list for register capture
691 * @outptr: Point to cached register capture list
694 * This function will alloc for a null list for register capture.
701 struct xe_guc_state_capture *gc = guc->capture; in xe_guc_capture_getnullheader()
723 * xe_guc_capture_ads_input_worst_size - Calculate the worst size for GuC register capture
726 * Calculate the worst size for GuC register capture by including all possible engines classes.
774 if (!guc->capture) in guc_capture_output_size_est()
779 * were all unrelated, then a burst of multiple error-capture events would dump in guc_capture_output_size_est()
822 * NOTE: capture_size is much smaller than the capture region in check_guc_capture_size()
828 * G2H event capture-notification, search for: in check_guc_capture_size()
833 "Failed to calculate error state capture buffer minimum size: %d!\n", in check_guc_capture_size()
836 xe_gt_dbg(guc_to_gt(guc), "Error state capture buffer maybe small: %d < %d\n", in check_guc_capture_size()
840 "Error state capture buffer lacks spare size: %d < %d (min = %d)\n", in check_guc_capture_size()
900 guc->capture->max_mmio_per_node); in guc_capture_init_node()
910 * DOC: Init, G2H-event and reporting flows for GuC-error-capture
914 * --> alloc A: GuC input capture regs lists (registered to GuC via ADS).
924 * --> alloc B: GuC output capture buf (registered via guc_init_params(log_param))
926 * Note2: 'x 3' to hold multiple capture groups
928 * GUC Runtime notify capture:
934 * --> alloc C: A capture-output-node structure that includes misc capture info along
937 * guc->capture->cachelist and populated with the error-capture
938 * data from GuC and then it's added into guc->capture->outlist linked
948 * --> xe_engine_manual_capture(For manual capture)
956 * guc->capture->outlist
975 * GuC's error-capture output is a ring buffer populated in a byte-stream fashion:
977 * The GuC Log buffer region for error-capture is managed like a ring buffer.
978 * The GuC firmware dumps error capture logs into this ring in a byte-stream flow.
980 * capture output structures are dword aligned.
983 * than one dword but the tail end of the err-capture buffer-region has lesser space left,
1076 if (!list_empty(&guc->capture->cachelist)) { in guc_capture_get_prealloc_node()
1080 list_for_each_entry_safe(n, ntmp, &guc->capture->cachelist, link) { in guc_capture_get_prealloc_node()
1091 list_for_each_entry_safe_reverse(n, ntmp, &guc->capture->outlist, link) { in guc_capture_get_prealloc_node()
1123 guc->capture->max_mmio_per_node); in guc_capture_clone_node()
1162 xe_gt_warn(gt, "Got mis-aligned register capture entries\n"); in guc_capture_extract_reglists()
1167 /* first get the capture group header */ in guc_capture_extract_reglists()
1177 * | Capture Group | in guc_capture_extract_reglists()
1179 * | | Capture Group Header: | | in guc_capture_extract_reglists()
1235 /* unknown capture type - skip over to next capture set */ in guc_capture_extract_reglists()
1247 * Based on the current capture type and what we have so far, in guc_capture_extract_reglists()
1256 guc_capture_add_node_to_outlist(guc->capture, node); in guc_capture_extract_reglists()
1261 guc_capture_add_node_to_outlist(guc->capture, node); in guc_capture_extract_reglists()
1267 guc_capture_add_node_to_outlist(guc->capture, node); in guc_capture_extract_reglists()
1281 xe_gt_dbg(gt, "Register capture missing global dump: %08x!\n", in guc_capture_extract_reglists()
1308 if (numregs > guc->capture->max_mmio_per_node) { in guc_capture_extract_reglists()
1309 xe_gt_dbg(gt, "Register capture list extraction clipped by prealloc!\n"); in guc_capture_extract_reglists()
1310 numregs = guc->capture->max_mmio_per_node; in guc_capture_extract_reglists()
1328 guc_capture_add_node_to_outlist(guc->capture, node); in guc_capture_extract_reglists()
1334 guc_capture_add_node_to_cachelist(guc->capture, node); in guc_capture_extract_reglists()
1390 "Register capture buffer in invalid state: read = 0x%X, size = 0x%X!\n", in __guc_capture_process_output()
1406 xe_gt_dbg(guc_to_gt(guc), "Capture extraction failed:%d\n", ret); in __guc_capture_process_output()
1439 if (guc->capture) in xe_guc_capture_process()
1455 new->reginfo[i].regs = drmm_kzalloc(drm, guc->capture->max_mmio_per_node * in guc_capture_alloc_one_node()
1478 xe_gt_warn(guc_to_gt(guc), "Register capture pre-alloc-cache failure\n"); in __guc_capture_create_prealloc_nodes()
1482 guc_capture_add_node_to_cachelist(guc->capture, node); in __guc_capture_create_prealloc_nodes()
1500 match = guc_capture_get_one_list(guc->capture->reglists, i, j, k); in guc_get_max_reglist_count()
1504 match = guc_capture_get_one_list(guc->capture->extlists, i, j, k); in guc_get_max_reglist_count()
1523 if (guc->capture->max_mmio_per_node) in guc_capture_create_prealloc_nodes()
1526 guc->capture->max_mmio_per_node = guc_get_max_reglist_count(guc); in guc_capture_create_prealloc_nodes()
1603 * regsinfo->regs is allocated based on guc->capture->max_mmio_per_node in xe_engine_manual_capture()
1612 xe_gt_dbg(gt, "Empty GuC capture register descriptor for %s", in xe_engine_manual_capture()
1620 /* Capture steering registers for rcs/ccs */ in xe_engine_manual_capture()
1649 guc_capture_add_node_to_outlist(guc->capture, new); in xe_engine_manual_capture()
1780 "full-capture", in xe_engine_snapshot_print()
1781 "partial-capture" in xe_engine_snapshot_print()
1837 * xe_guc_capture_get_matching_and_lock - Matching GuC capture for the queue.
1840 * Search within the capture outlist for the queue, could be used for check if
1841 * GuC capture is ready for the queue.
1844 * Returns: found guc-capture node ptr else NULL
1881 * Look for a matching GuC reported error capture node from in xe_guc_capture_get_matching_and_lock()
1885 list_for_each_entry_safe(n, ntmp, &guc->capture->outlist, link) { in xe_guc_capture_get_matching_and_lock()
1936 * GuC-err-capture node for this engine after in xe_engine_snapshot_capture_for_queue()
1941 guc_capture_free_outlist_node(guc->capture, in xe_engine_snapshot_capture_for_queue()
1965 guc_capture_remove_stale_matches_from_list(guc->capture, n); in xe_guc_capture_put_matched_nodes()
1966 guc_capture_free_outlist_node(guc->capture, n); in xe_guc_capture_put_matched_nodes()
1975 * Init steering register list for GuC register capture, create pre-alloc node
1991 * xe_guc_capture_init - Init for GuC register capture
1994 * Init for GuC register capture, alloc memory for capture data structure.
2001 guc->capture = drmm_kzalloc(guc_to_drm(guc), sizeof(*guc->capture), GFP_KERNEL); in xe_guc_capture_init()
2002 if (!guc->capture) in xe_guc_capture_init()
2005 guc->capture->reglists = guc_capture_get_device_reglist(guc_to_xe(guc)); in xe_guc_capture_init()
2007 INIT_LIST_HEAD(&guc->capture->outlist); in xe_guc_capture_init()
2008 INIT_LIST_HEAD(&guc->capture->cachelist); in xe_guc_capture_init()