diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:27:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:27:49 +0000 |
commit | ace9429bb58fd418f0c81d4c2835699bddf6bde6 (patch) | |
tree | b2d64bc10158fdd5497876388cd68142ca374ed3 /drivers/gpu/drm/i915/i915_active_types.h | |
parent | Initial commit. (diff) | |
download | linux-ace9429bb58fd418f0c81d4c2835699bddf6bde6.tar.xz linux-ace9429bb58fd418f0c81d4c2835699bddf6bde6.zip |
Adding upstream version 6.6.15.upstream/6.6.15
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_active_types.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_active_types.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_active_types.h b/drivers/gpu/drm/i915/i915_active_types.h new file mode 100644 index 0000000000..b02a78ac87 --- /dev/null +++ b/drivers/gpu/drm/i915/i915_active_types.h @@ -0,0 +1,47 @@ +/* + * SPDX-License-Identifier: MIT + * + * Copyright © 2019 Intel Corporation + */ + +#ifndef _I915_ACTIVE_TYPES_H_ +#define _I915_ACTIVE_TYPES_H_ + +#include <linux/atomic.h> +#include <linux/dma-fence.h> +#include <linux/llist.h> +#include <linux/mutex.h> +#include <linux/rbtree.h> +#include <linux/rcupdate.h> +#include <linux/workqueue.h> + +struct i915_active_fence { + struct dma_fence __rcu *fence; + struct dma_fence_cb cb; +}; + +struct active_node; + +struct i915_active { + atomic_t count; + struct mutex mutex; + + spinlock_t tree_lock; + struct active_node *cache; + struct rb_root tree; + + /* Preallocated "exclusive" node */ + struct i915_active_fence excl; + + unsigned long flags; +#define I915_ACTIVE_RETIRE_SLEEPS BIT(0) + + int (*active)(struct i915_active *ref); + void (*retire)(struct i915_active *ref); + + struct work_struct work; + + struct llist_head preallocated_barriers; +}; + +#endif /* _I915_ACTIVE_TYPES_H_ */ |