]> asedeno.scripts.mit.edu Git - linux.git/blob - drivers/gpu/drm/i915/i915_active_types.h
Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / drivers / gpu / drm / i915 / i915_active_types.h
1 /*
2  * SPDX-License-Identifier: MIT
3  *
4  * Copyright © 2019 Intel Corporation
5  */
6
7 #ifndef _I915_ACTIVE_TYPES_H_
8 #define _I915_ACTIVE_TYPES_H_
9
10 #include <linux/rbtree.h>
11 #include <linux/rcupdate.h>
12
13 struct drm_i915_private;
14 struct i915_active_request;
15 struct i915_request;
16
17 typedef void (*i915_active_retire_fn)(struct i915_active_request *,
18                                       struct i915_request *);
19
20 struct i915_active_request {
21         struct i915_request __rcu *request;
22         struct list_head link;
23         i915_active_retire_fn retire;
24 };
25
26 struct i915_active {
27         struct drm_i915_private *i915;
28
29         struct rb_root tree;
30         struct i915_active_request last;
31         unsigned int count;
32
33         void (*retire)(struct i915_active *ref);
34 };
35
36 #endif /* _I915_ACTIVE_TYPES_H_ */