diff options
| author | Matthew Brost <matthew.brost@intel.com> | 2024-06-11 07:40:49 -0700 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2024-06-12 19:10:24 -0700 |
| commit | 7f4f492c7058fb82d2892078b556bde8a41d0b60 (patch) | |
| tree | 62c09cc0d151da48eafe63143c7e8e6d0a3ff21c | |
| parent | 41e1fa93a2fb3cf5a50e556cff7bb51231781806 (diff) | |
| download | linux-7f4f492c7058fb82d2892078b556bde8a41d0b60.tar.gz linux-7f4f492c7058fb82d2892078b556bde8a41d0b60.zip | |
drm/xe: Assert runnable state in handle_sched_done
Ensure G2H and KMD GuC machine match.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-8-matthew.brost@intel.com
| -rw-r--r-- | drivers/gpu/drm/xe/xe_guc_submit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index afd22a8d815d..ab0dc93d7740 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -1592,16 +1592,21 @@ static void deregister_exec_queue(struct xe_guc *guc, struct xe_exec_queue *q) xe_guc_ct_send_g2h_handler(&guc->ct, action, ARRAY_SIZE(action)); } -static void handle_sched_done(struct xe_guc *guc, struct xe_exec_queue *q) +static void handle_sched_done(struct xe_guc *guc, struct xe_exec_queue *q, + u32 runnable_state) { trace_xe_exec_queue_scheduling_done(q); if (exec_queue_pending_enable(q)) { + xe_gt_assert(guc_to_gt(guc), runnable_state == 1); + q->guc->resume_time = ktime_get(); clear_exec_queue_pending_enable(q); smp_wmb(); wake_up_all(&guc->ct.wq); } else { + xe_gt_assert(guc_to_gt(guc), runnable_state == 0); + clear_exec_queue_pending_disable(q); if (q->guc->suspend_pending) { suspend_fence_signal(q); @@ -1640,7 +1645,7 @@ int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len) return -EPROTO; } - handle_sched_done(guc, q); + handle_sched_done(guc, q, runnable_state); return 0; } |
