mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
drm/xe: Add xe_sched_add_msg_locked helper
Will help by allowing callers to own message locking. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240809191929.3138956-4-matthew.brost@intel.com
This commit is contained in:
parent
fc33077765
commit
17d6abcbf6
@ -94,8 +94,15 @@ void xe_sched_add_msg(struct xe_gpu_scheduler *sched,
|
||||
struct xe_sched_msg *msg)
|
||||
{
|
||||
xe_sched_msg_lock(sched);
|
||||
list_add_tail(&msg->link, &sched->msgs);
|
||||
xe_sched_add_msg_locked(sched, msg);
|
||||
xe_sched_msg_unlock(sched);
|
||||
}
|
||||
|
||||
void xe_sched_add_msg_locked(struct xe_gpu_scheduler *sched,
|
||||
struct xe_sched_msg *msg)
|
||||
{
|
||||
lockdep_assert_held(&sched->base.job_list_lock);
|
||||
|
||||
list_add_tail(&msg->link, &sched->msgs);
|
||||
xe_sched_process_msg_queue(sched);
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ void xe_sched_submission_stop(struct xe_gpu_scheduler *sched);
|
||||
|
||||
void xe_sched_add_msg(struct xe_gpu_scheduler *sched,
|
||||
struct xe_sched_msg *msg);
|
||||
void xe_sched_add_msg_locked(struct xe_gpu_scheduler *sched,
|
||||
struct xe_sched_msg *msg);
|
||||
|
||||
static inline void xe_sched_msg_lock(struct xe_gpu_scheduler *sched)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user