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 #include "i915_utils.h"
20 struct i915_active_fence {
21 struct dma_fence __rcu *fence;
22 struct dma_fence_cb cb;
32 struct active_node *cache;
35 /* Preallocated "exclusive" node */
36 struct i915_active_fence excl;
39 #define I915_ACTIVE_RETIRE_SLEEPS BIT(0)
41 int (*active)(struct i915_active *ref);
42 void (*retire)(struct i915_active *ref);
44 struct work_struct work;
46 struct llist_head preallocated_barriers;
49 #endif /* _I915_ACTIVE_TYPES_H_ */