xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/i915/i915_globals.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1 /*	$NetBSD: i915_globals.h,v 1.2 2021/12/18 23:45:28 riastradh Exp $	*/
2 
3 /*
4  * SPDX-License-Identifier: MIT
5  *
6  * Copyright © 2019 Intel Corporation
7  */
8 
9 #ifndef _I915_GLOBALS_H_
10 #define _I915_GLOBALS_H_
11 
12 #include <linux/types.h>
13 
14 typedef void (*i915_global_func_t)(void);
15 
16 struct i915_global {
17 	struct list_head link;
18 
19 	i915_global_func_t shrink;
20 	i915_global_func_t exit;
21 };
22 
23 void i915_global_register(struct i915_global *global);
24 
25 int i915_globals_init(void);
26 void i915_globals_park(void);
27 void i915_globals_unpark(void);
28 void i915_globals_exit(void);
29 
30 /* constructors */
31 int i915_global_active_init(void);
32 int i915_global_buddy_init(void);
33 int i915_global_context_init(void);
34 int i915_global_gem_context_init(void);
35 int i915_global_objects_init(void);
36 int i915_global_request_init(void);
37 int i915_global_scheduler_init(void);
38 int i915_global_vma_init(void);
39 
40 #endif /* _I915_GLOBALS_H_ */
41