xref: /linux/drivers/gpu/drm/xe/xe_wa.h (revision 4b132aacb0768ac1e652cf517097ea6f237214b9)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2022 Intel Corporation
4  */
5 
6 #ifndef _XE_WA_
7 #define _XE_WA_
8 
9 struct drm_printer;
10 struct xe_gt;
11 struct xe_hw_engine;
12 struct xe_tile;
13 
14 int xe_wa_init(struct xe_gt *gt);
15 void xe_wa_process_oob(struct xe_gt *gt);
16 void xe_wa_process_gt(struct xe_gt *gt);
17 void xe_wa_process_engine(struct xe_hw_engine *hwe);
18 void xe_wa_process_lrc(struct xe_hw_engine *hwe);
19 void xe_wa_apply_tile_workarounds(struct xe_tile *tile);
20 void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p);
21 
22 /**
23  * XE_WA - Out-of-band workarounds, that don't fit the lifecycle any
24  *         other more specific type
25  * @gt__: gt instance
26  * @id__: XE_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
27  */
28 #define XE_WA(gt__, id__) test_bit(XE_WA_OOB_ ## id__, (gt__)->wa_active.oob)
29 
30 #endif
31