Commit 41e1fa93 authored by Matthew Brost's avatar Matthew Brost

drm/xe: Improve unexpected state error messages

Include G2H handler name when an unexpected error state messages.

v6:
- Use xe_gt_err (Michal)
- Print runnable state (John H)
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/20240611144053.2805091-7-matthew.brost@intel.com
parent 49cc215a
...@@ -1620,6 +1620,7 @@ int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len) ...@@ -1620,6 +1620,7 @@ int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
struct xe_device *xe = guc_to_xe(guc); struct xe_device *xe = guc_to_xe(guc);
struct xe_exec_queue *q; struct xe_exec_queue *q;
u32 guc_id = msg[0]; u32 guc_id = msg[0];
u32 runnable_state = msg[1];
if (unlikely(len < 2)) { if (unlikely(len < 2)) {
drm_err(&xe->drm, "Invalid length %u", len); drm_err(&xe->drm, "Invalid length %u", len);
...@@ -1632,8 +1633,10 @@ int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len) ...@@ -1632,8 +1633,10 @@ int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
if (unlikely(!exec_queue_pending_enable(q) && if (unlikely(!exec_queue_pending_enable(q) &&
!exec_queue_pending_disable(q))) { !exec_queue_pending_disable(q))) {
drm_err(&xe->drm, "Unexpected engine state 0x%04x", xe_gt_err(guc_to_gt(guc),
atomic_read(&q->guc->state)); "SCHED_DONE: Unexpected engine state 0x%04x, guc_id=%d, runnable_state=%u",
atomic_read(&q->guc->state), q->guc->id,
runnable_state);
return -EPROTO; return -EPROTO;
} }
...@@ -1671,8 +1674,9 @@ int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len) ...@@ -1671,8 +1674,9 @@ int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
if (!exec_queue_destroyed(q) || exec_queue_pending_disable(q) || if (!exec_queue_destroyed(q) || exec_queue_pending_disable(q) ||
exec_queue_pending_enable(q) || exec_queue_enabled(q)) { exec_queue_pending_enable(q) || exec_queue_enabled(q)) {
drm_err(&xe->drm, "Unexpected engine state 0x%04x", xe_gt_err(guc_to_gt(guc),
atomic_read(&q->guc->state)); "DEREGISTER_DONE: Unexpected engine state 0x%04x, guc_id=%d",
atomic_read(&q->guc->state), q->guc->id);
return -EPROTO; return -EPROTO;
} }
......
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