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

drm/xe: Add xe_sched_add_msg_locked helper

parent fc330777
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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);
}
+2 −0
Original line number Diff line number Diff line
@@ -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)
{