Commit 17d6abcb authored by Matthew Brost's avatar Matthew Brost

drm/xe: Add xe_sched_add_msg_locked helper

Will help by allowing callers to own message locking.
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarJonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240809191929.3138956-4-matthew.brost@intel.com
parent fc330777
...@@ -94,8 +94,15 @@ void xe_sched_add_msg(struct xe_gpu_scheduler *sched, ...@@ -94,8 +94,15 @@ void xe_sched_add_msg(struct xe_gpu_scheduler *sched,
struct xe_sched_msg *msg) struct xe_sched_msg *msg)
{ {
xe_sched_msg_lock(sched); xe_sched_msg_lock(sched);
list_add_tail(&msg->link, &sched->msgs); xe_sched_add_msg_locked(sched, msg);
xe_sched_msg_unlock(sched); 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); xe_sched_process_msg_queue(sched);
} }
...@@ -24,6 +24,8 @@ void xe_sched_submission_stop(struct xe_gpu_scheduler *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, void xe_sched_add_msg(struct xe_gpu_scheduler *sched,
struct xe_sched_msg *msg); 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) static inline void xe_sched_msg_lock(struct xe_gpu_scheduler *sched)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment