xref: /linux/drivers/gpu/drm/xe/xe_reg_sr.h (revision 334fbe734e687404f346eba7d5d96ed2b44d35ab)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2022 Intel Corporation
4  */
5 
6 #ifndef _XE_REG_SR_
7 #define _XE_REG_SR_
8 
9 /*
10  * Reg save/restore bookkeeping
11  */
12 
13 struct xe_device;
14 struct xe_gt;
15 struct xe_hw_engine;
16 struct xe_reg_sr;
17 struct xe_reg_sr_entry;
18 struct drm_printer;
19 
20 int xe_reg_sr_init(struct xe_reg_sr *sr, const char *name, struct xe_device *xe);
21 void xe_reg_sr_dump(struct xe_reg_sr *sr, struct drm_printer *p);
22 void xe_reg_sr_readback_check(struct xe_reg_sr *sr,
23 			      struct xe_gt *gt,
24 			      struct drm_printer *p);
25 void xe_reg_sr_lrc_check(struct xe_reg_sr *sr,
26 			 struct xe_gt *gt,
27 			 struct xe_hw_engine *hwe,
28 			 struct drm_printer *p);
29 
30 int xe_reg_sr_add(struct xe_reg_sr *sr, const struct xe_reg_sr_entry *e,
31 		  struct xe_gt *gt);
32 void xe_reg_sr_apply_mmio(struct xe_reg_sr *sr, struct xe_gt *gt);
33 void xe_reg_sr_apply_whitelist(struct xe_hw_engine *hwe);
34 
35 #endif
36