xref: /linux/drivers/gpu/drm/xe/xe_execlist_types.h (revision eeb9f5c2dcec90009d7cf12e780e7f9631993fc5)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2022 Intel Corporation
4  */
5 
6 #ifndef _XE_EXECLIST_TYPES_H_
7 #define _XE_EXECLIST_TYPES_H_
8 
9 #include <linux/list.h>
10 #include <linux/spinlock.h>
11 #include <linux/workqueue.h>
12 
13 #include "xe_exec_queue_types.h"
14 
15 struct xe_hw_engine;
16 struct xe_execlist_exec_queue;
17 
18 struct xe_execlist_port {
19 	struct xe_hw_engine *hwe;
20 
21 	spinlock_t lock;
22 
23 	struct list_head active[XE_EXEC_QUEUE_PRIORITY_COUNT];
24 
25 	u32 last_ctx_id;
26 
27 	struct xe_execlist_exec_queue *running_exl;
28 
29 	struct timer_list irq_fail;
30 };
31 
32 struct xe_execlist_exec_queue {
33 	struct xe_exec_queue *q;
34 
35 	struct drm_gpu_scheduler sched;
36 
37 	struct drm_sched_entity entity;
38 
39 	struct xe_execlist_port *port;
40 
41 	bool has_run;
42 
43 	struct work_struct fini_async;
44 
45 	enum xe_exec_queue_priority active_priority;
46 	struct list_head active_link;
47 };
48 
49 #endif
50