Lines Matching +full:p +full:- +full:tile
1 // SPDX-License-Identifier: MIT
11 #include <linux/fault-inject.h>
37 * - LRC workarounds: workarounds that touch registers that are
45 * - Engine workarounds: the list of these WAs is applied whenever the specific
57 * - GT workarounds: the list of these WAs is applied whenever these registers
60 * - Register whitelist: some workarounds need to be implemented in userspace,
64 * these to/be-whitelisted registers to some special HW registers).
66 * - Workaround batchbuffers: buffers that get executed automatically by the
88 * |----------->|
89 * .------------.------------.-------------.------------.--------------.-----------.
90 * |Ring | Engine | Mid-context | Engine | Post-context | Ring |
92 * `------------'------------'-------------'------------'--------------'-----------'
94 * - Other/OOB: There are WAs that, due to their nature, cannot be applied from
119 __diag_ignore_all("-Woverride-init", "Allow field overrides in table");
383 /* ADL-P */
937 static_assert(ARRAY_SIZE(oob_was) - 1 == _XE_WA_OOB_COUNT);
944 static_assert(ARRAY_SIZE(device_oob_was) - 1 == _XE_DEVICE_WA_OOB_COUNT);
949 * xe_wa_process_device_oob - process OOB workaround table
960 xe_rtp_process_ctx_enable_active_tracking(&ctx, xe->wa_active.oob, ARRAY_SIZE(device_oob_was));
962 xe->wa_active.oob_initialized = true;
967 * xe_wa_process_gt_oob - process GT OOB workaround table
977 xe_rtp_process_ctx_enable_active_tracking(&ctx, gt->wa_active.oob,
979 gt->wa_active.oob_initialized = true;
984 * xe_wa_process_gt - process GT workaround table
994 xe_rtp_process_ctx_enable_active_tracking(&ctx, gt->wa_active.gt,
996 xe_rtp_process_to_sr(&ctx, gt_was, ARRAY_SIZE(gt_was), >->reg_sr);
1001 * xe_wa_process_engine - process engine workaround table
1012 xe_rtp_process_ctx_enable_active_tracking(&ctx, hwe->gt->wa_active.engine,
1014 xe_rtp_process_to_sr(&ctx, engine_was, ARRAY_SIZE(engine_was), &hwe->reg_sr);
1018 * xe_wa_process_lrc - process context workaround table
1029 xe_rtp_process_ctx_enable_active_tracking(&ctx, hwe->gt->wa_active.lrc,
1031 xe_rtp_process_to_sr(&ctx, lrc_was, ARRAY_SIZE(lrc_was), &hwe->reg_lrc);
1035 * xe_wa_device_init - initialize device with workaround oob bookkeeping
1042 unsigned long *p;
1044 p = drmm_kzalloc(&xe->drm,
1045 sizeof(*p) * BITS_TO_LONGS(ARRAY_SIZE(device_oob_was)),
1048 if (!p)
1049 return -ENOMEM;
1051 xe->wa_active.oob = p;
1057 * xe_wa_gt_init - initialize gt with workaround bookkeeping
1066 unsigned long *p;
1074 p = drmm_kzalloc(&xe->drm, sizeof(*p) * total, GFP_KERNEL);
1075 if (!p)
1076 return -ENOMEM;
1078 gt->wa_active.gt = p;
1079 p += n_gt;
1080 gt->wa_active.engine = p;
1081 p += n_engine;
1082 gt->wa_active.lrc = p;
1083 p += n_lrc;
1084 gt->wa_active.oob = p;
1090 void xe_wa_device_dump(struct xe_device *xe, struct drm_printer *p)
1094 drm_printf(p, "Device OOB Workarounds\n");
1095 for_each_set_bit(idx, xe->wa_active.oob, ARRAY_SIZE(device_oob_was))
1097 drm_printf_indent(p, 1, "%s\n", device_oob_was[idx].name);
1101 * xe_wa_gt_dump() - Dump GT workarounds into a drm printer.
1103 * @p: the &drm_printer
1107 int xe_wa_gt_dump(struct xe_gt *gt, struct drm_printer *p)
1111 drm_printf(p, "GT Workarounds\n");
1112 for_each_set_bit(idx, gt->wa_active.gt, ARRAY_SIZE(gt_was))
1113 drm_printf_indent(p, 1, "%s\n", gt_was[idx].name);
1115 drm_puts(p, "\n");
1116 drm_printf(p, "Engine Workarounds\n");
1117 for_each_set_bit(idx, gt->wa_active.engine, ARRAY_SIZE(engine_was))
1118 drm_printf_indent(p, 1, "%s\n", engine_was[idx].name);
1120 drm_puts(p, "\n");
1121 drm_printf(p, "LRC Workarounds\n");
1122 for_each_set_bit(idx, gt->wa_active.lrc, ARRAY_SIZE(lrc_was))
1123 drm_printf_indent(p, 1, "%s\n", lrc_was[idx].name);
1125 drm_puts(p, "\n");
1126 drm_printf(p, "OOB Workarounds\n");
1127 for_each_set_bit(idx, gt->wa_active.oob, ARRAY_SIZE(oob_was))
1129 drm_printf_indent(p, 1, "%s\n", oob_was[idx].name);
1134 * Apply tile (non-GT, non-display) workarounds. Think very carefully before
1145 void xe_wa_apply_tile_workarounds(struct xe_tile *tile)
1147 struct xe_mmio *mmio = &tile->mmio;
1149 if (IS_SRIOV_VF(tile->xe))
1152 if (XE_DEVICE_WA(tile->xe, 22010954014))