mirror of https://gitee.com/openkylin/linux.git
drm/i915: Lift waiter/signaler iterators
Lift the list iteration defines for traversing the signaler/waiter lists into i915_scheduler.h for reuse. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201119165616.10834-5-chris@chris-wilson.co.uk
This commit is contained in:
parent
0986317a45
commit
b5b349b93b
|
@ -1836,16 +1836,6 @@ static void virtual_xfer_context(struct virtual_engine *ve,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define for_each_waiter(p__, rq__) \
|
|
||||||
list_for_each_entry_lockless(p__, \
|
|
||||||
&(rq__)->sched.waiters_list, \
|
|
||||||
wait_link)
|
|
||||||
|
|
||||||
#define for_each_signaler(p__, rq__) \
|
|
||||||
list_for_each_entry_rcu(p__, \
|
|
||||||
&(rq__)->sched.signalers_list, \
|
|
||||||
signal_link)
|
|
||||||
|
|
||||||
static void defer_request(struct i915_request *rq, struct list_head * const pl)
|
static void defer_request(struct i915_request *rq, struct list_head * const pl)
|
||||||
{
|
{
|
||||||
LIST_HEAD(list);
|
LIST_HEAD(list);
|
||||||
|
|
|
@ -81,4 +81,14 @@ struct i915_dependency {
|
||||||
#define I915_DEPENDENCY_WEAK BIT(2)
|
#define I915_DEPENDENCY_WEAK BIT(2)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define for_each_waiter(p__, rq__) \
|
||||||
|
list_for_each_entry_lockless(p__, \
|
||||||
|
&(rq__)->sched.waiters_list, \
|
||||||
|
wait_link)
|
||||||
|
|
||||||
|
#define for_each_signaler(p__, rq__) \
|
||||||
|
list_for_each_entry_rcu(p__, \
|
||||||
|
&(rq__)->sched.signalers_list, \
|
||||||
|
signal_link)
|
||||||
|
|
||||||
#endif /* _I915_SCHEDULER_TYPES_H_ */
|
#endif /* _I915_SCHEDULER_TYPES_H_ */
|
||||||
|
|
Loading…
Reference in New Issue