]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/guc: Add extra debug on CT deadlock
authorMatthew Brost <matthew.brost@intel.com>
Tue, 14 Dec 2021 17:04:58 +0000 (09:04 -0800)
committerJohn Harrison <John.C.Harrison@Intel.com>
Thu, 16 Dec 2021 03:10:51 +0000 (19:10 -0800)
Print CT state (H2G + G2H head / tail pointers, credits) on CT
deadlock.

v2:
 (John Harrison)
  - Add units to debug messages

Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211214170500.28569-6-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c

index a0cc34be7b56be4fdb6a66807b1b2dc7ca0a6816..741be9abab68e1410257a5942d28b98e9e36ee1f 100644 (file)
@@ -523,6 +523,15 @@ static inline bool ct_deadlocked(struct intel_guc_ct *ct)
                CT_ERROR(ct, "Communication stalled for %lld ms, desc status=%#x,%#x\n",
                         ktime_ms_delta(ktime_get(), ct->stall_time),
                         send->status, recv->status);
+               CT_ERROR(ct, "H2G Space: %u (Bytes)\n",
+                        atomic_read(&ct->ctbs.send.space) * 4);
+               CT_ERROR(ct, "Head: %u (Dwords)\n", ct->ctbs.send.desc->head);
+               CT_ERROR(ct, "Tail: %u (Dwords)\n", ct->ctbs.send.desc->tail);
+               CT_ERROR(ct, "G2H Space: %u (Bytes)\n",
+                        atomic_read(&ct->ctbs.recv.space) * 4);
+               CT_ERROR(ct, "Head: %u\n (Dwords)", ct->ctbs.recv.desc->head);
+               CT_ERROR(ct, "Tail: %u\n (Dwords)", ct->ctbs.recv.desc->tail);
+
                ct->ctbs.send.broken = true;
        }