1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2021 Intel Corporation 4 */ 5 6 #ifndef _XE_HW_ENGINE_H_ 7 #define _XE_HW_ENGINE_H_ 8 9 #include "xe_hw_engine_types.h" 10 11 struct drm_printer; 12 13 int xe_hw_engines_init_early(struct xe_gt *gt); 14 int xe_hw_engines_init(struct xe_gt *gt); 15 void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec); 16 void xe_hw_engine_enable_ring(struct xe_hw_engine *hwe); 17 u32 xe_hw_engine_mask_per_class(struct xe_gt *gt, 18 enum xe_engine_class engine_class); 19 20 struct xe_hw_engine_snapshot * 21 xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe); 22 void xe_hw_engine_snapshot_free(struct xe_hw_engine_snapshot *snapshot); 23 void xe_hw_engine_snapshot_print(struct xe_hw_engine_snapshot *snapshot, 24 struct drm_printer *p); 25 void xe_hw_engine_print(struct xe_hw_engine *hwe, struct drm_printer *p); 26 void xe_hw_engine_setup_default_lrc_state(struct xe_hw_engine *hwe); 27 28 bool xe_hw_engine_is_reserved(struct xe_hw_engine *hwe); 29 static inline bool xe_hw_engine_is_valid(struct xe_hw_engine *hwe) 30 { 31 return hwe->name; 32 } 33 34 #endif 35