xref: /linux/drivers/gpu/drm/xe/xe_sysctrl_types.h (revision 49bda4826843be0ef97a162009a29ea3a63f3935)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2026 Intel Corporation
4  */
5 
6 #ifndef _XE_SYSCTRL_TYPES_H_
7 #define _XE_SYSCTRL_TYPES_H_
8 
9 #include <linux/mutex.h>
10 #include <linux/types.h>
11 #include <linux/workqueue_types.h>
12 
13 struct xe_mmio;
14 
15 /**
16  * struct xe_sysctrl - System Controller driver context
17  *
18  * This structure maintains the runtime state for System Controller
19  * communication. All fields are initialized during xe_sysctrl_init()
20  * and protected appropriately for concurrent access.
21  */
22 struct xe_sysctrl {
23 	/** @mmio: MMIO region for system control registers */
24 	struct xe_mmio *mmio;
25 
26 	/** @cmd_lock: Mutex protecting mailbox command operations */
27 	struct mutex cmd_lock;
28 
29 	/** @work: Pending events worker */
30 	struct work_struct work;
31 
32 	/** @event_lock: Mutex protecting pending events */
33 	struct mutex event_lock;
34 };
35 
36 #endif
37