1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2022 Intel Corporation
6 #ifndef _XE_GUC_ENGINE_TYPES_H_
7 #define _XE_GUC_ENGINE_TYPES_H_
9 #include <linux/spinlock.h>
10 #include <linux/workqueue.h>
12 #include "xe_gpu_scheduler_types.h"
18 * struct xe_guc_exec_queue - GuC specific state for an xe_exec_queue
20 struct xe_guc_exec_queue {
21 /** @q: Backpointer to parent xe_exec_queue */
22 struct xe_exec_queue *q;
23 /** @sched: GPU scheduler for this xe_exec_queue */
24 struct xe_gpu_scheduler sched;
25 /** @entity: Scheduler entity for this xe_exec_queue */
26 struct xe_sched_entity entity;
28 * @static_msgs: Static messages for this xe_exec_queue, used when
29 * a message needs to sent through the GPU scheduler but memory
30 * allocations are not allowed.
32 #define MAX_STATIC_MSG_TYPE 3
33 struct xe_sched_msg static_msgs[MAX_STATIC_MSG_TYPE];
34 /** @lr_tdr: long running TDR worker */
35 struct work_struct lr_tdr;
36 /** @fini_async: do final fini async from this worker */
37 struct work_struct fini_async;
38 /** @resume_time: time of last resume */
40 /** @state: GuC specific state for this xe_exec_queue */
42 /** @wqi_head: work queue item tail */
44 /** @wqi_tail: work queue item tail */
46 /** @id: GuC id for this exec_queue */
48 /** @suspend_wait: wait queue used to wait on pending suspends */
49 wait_queue_head_t suspend_wait;
50 /** @suspend_pending: a suspend of the exec_queue is pending */