xref: /linux/drivers/gpu/drm/xe/xe_hw_fence.h (revision 151ebcf0797b1a3ba53c8843dc21748c80e098c7)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2021 Intel Corporation
4  */
5 
6 #ifndef _XE_HW_FENCE_H_
7 #define _XE_HW_FENCE_H_
8 
9 #include "xe_hw_fence_types.h"
10 
11 /* Cause an early wrap to catch wrapping errors */
12 #define XE_FENCE_INITIAL_SEQNO (-127)
13 
14 int xe_hw_fence_module_init(void);
15 void xe_hw_fence_module_exit(void);
16 
17 void xe_hw_fence_irq_init(struct xe_hw_fence_irq *irq);
18 void xe_hw_fence_irq_finish(struct xe_hw_fence_irq *irq);
19 void xe_hw_fence_irq_run(struct xe_hw_fence_irq *irq);
20 void xe_hw_fence_irq_stop(struct xe_hw_fence_irq *irq);
21 void xe_hw_fence_irq_start(struct xe_hw_fence_irq *irq);
22 
23 void xe_hw_fence_ctx_init(struct xe_hw_fence_ctx *ctx, struct xe_gt *gt,
24 			  struct xe_hw_fence_irq *irq, const char *name);
25 void xe_hw_fence_ctx_finish(struct xe_hw_fence_ctx *ctx);
26 
27 struct xe_hw_fence *xe_hw_fence_create(struct xe_hw_fence_ctx *ctx,
28 				       struct iosys_map seqno_map);
29 
30 #endif
31