mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![Jani Nikula](/assets/img/avatar_default.png)
Not needed. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/52b1cf56c16bf669a1357ce81d9232c5480914a4.1639142167.git.jani.nikula@intel.com
47 lines
901 B
C
47 lines
901 B
C
/*
|
|
* 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_ */
|