drm/xe: Reinit msg link when processing a message
authorMatthew Brost <matthew.brost@intel.com>
Fri, 9 Aug 2024 19:19:26 +0000 (12:19 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Sat, 10 Aug 2024 02:07:29 +0000 (19:07 -0700)
Will help to avoid adding a static message twice.

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-3-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_gpu_scheduler.c

index eea71c6..1c703e8 100644 (file)
@@ -31,7 +31,7 @@ xe_sched_get_msg(struct xe_gpu_scheduler *sched)
        msg = list_first_entry_or_null(&sched->msgs,
                                       struct xe_sched_msg, link);
        if (msg)
-               list_del(&msg->link);
+               list_del_init(&msg->link);
        xe_sched_msg_unlock(sched);
 
        return msg;