xref: /linux/drivers/gpu/drm/xe/xe_hw_engine_group.h (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2024 Intel Corporation
4  */
5 
6 #ifndef _XE_HW_ENGINE_GROUP_H_
7 #define _XE_HW_ENGINE_GROUP_H_
8 
9 #include "xe_hw_engine_group_types.h"
10 
11 struct drm_device;
12 struct xe_exec_queue;
13 struct xe_gt;
14 
15 int xe_hw_engine_setup_groups(struct xe_gt *gt);
16 
17 int xe_hw_engine_group_add_exec_queue(struct xe_hw_engine_group *group, struct xe_exec_queue *q);
18 void xe_hw_engine_group_del_exec_queue(struct xe_hw_engine_group *group, struct xe_exec_queue *q);
19 
20 int xe_hw_engine_group_get_mode(struct xe_hw_engine_group *group,
21 				enum xe_hw_engine_group_execution_mode new_mode,
22 				enum xe_hw_engine_group_execution_mode *previous_mode);
23 void xe_hw_engine_group_put(struct xe_hw_engine_group *group);
24 
25 enum xe_hw_engine_group_execution_mode
26 xe_hw_engine_group_find_exec_mode(struct xe_exec_queue *q);
27 void xe_hw_engine_group_resume_faulting_lr_jobs(struct xe_hw_engine_group *group);
28 
29 #endif
30