2 * SPDX-License-Identifier: MIT
4 * Copyright © 2019 Intel Corporation
7 #ifndef _I915_ACTIVE_TYPES_H_
8 #define _I915_ACTIVE_TYPES_H_
10 #include <linux/atomic.h>
11 #include <linux/dma-fence.h>
12 #include <linux/llist.h>
13 #include <linux/mutex.h>
14 #include <linux/rbtree.h>
15 #include <linux/rcupdate.h>
16 #include <linux/workqueue.h>
18 struct i915_active_fence {
19 struct dma_fence __rcu *fence;
20 struct dma_fence_cb cb;
30 struct active_node *cache;
33 /* Preallocated "exclusive" node */
34 struct i915_active_fence excl;
37 #define I915_ACTIVE_RETIRE_SLEEPS BIT(0)
39 int (*active)(struct i915_active *ref);
40 void (*retire)(struct i915_active *ref);
42 struct work_struct work;
44 struct llist_head preallocated_barriers;
47 #endif /* _I915_ACTIVE_TYPES_H_ */