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 21 void xe_hw_fence_ctx_init(struct xe_hw_fence_ctx *ctx, struct xe_gt *gt, 22 struct xe_hw_fence_irq *irq, const char *name); 23 void xe_hw_fence_ctx_finish(struct xe_hw_fence_ctx *ctx); 24 25 struct dma_fence *xe_hw_fence_alloc(void); 26 27 void xe_hw_fence_free(struct dma_fence *fence); 28 29 void xe_hw_fence_init(struct dma_fence *fence, struct xe_hw_fence_ctx *ctx, 30 struct iosys_map seqno_map); 31 #endif 32