[CI] drm/i915/gt: Trace the CS interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have traces for the semaphore and the error, but not the far more
frequent CS interrupts. This is likely to be too much, but for the
purpose of live_unlite_preempt it may answer a question or two.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/gt/intel_gt_irq.c | 6 +++++-
 drivers/gpu/drm/i915/gt/intel_lrc.c    | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_irq.c b/drivers/gpu/drm/i915/gt/intel_gt_irq.c
index 0cc7dd54f4f9..4291d55c5457 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_irq.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_irq.c
@@ -48,8 +48,12 @@ cs_irq_handler(struct intel_engine_cs *engine, u32 iir)
 			tasklet = true;
 	}
 
-	if (iir & GT_CONTEXT_SWITCH_INTERRUPT)
+	if (iir & GT_CONTEXT_SWITCH_INTERRUPT) {
+		ENGINE_TRACE(engine, "CS: %x %x\n",
+			     ENGINE_READ_FW(engine, RING_EXECLIST_STATUS_HI),
+			     ENGINE_READ_FW(engine, RING_EXECLIST_STATUS_LO));
 		tasklet = true;
+	}
 
 	if (iir & GT_RENDER_USER_INTERRUPT) {
 		intel_engine_signal_breadcrumbs(engine);
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index de5be57ed6d2..87103f19c91f 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -3105,6 +3105,10 @@ static void execlists_submission_tasklet(unsigned long data)
 	struct intel_engine_cs * const engine = (struct intel_engine_cs *)data;
 	bool timeout = preempt_timeout(engine);
 
+	ENGINE_TRACE(engine, "head:%d, tail:%d\n",
+		     engine->execlists.csb_head,
+		     READ_ONCE(*engine->execlists.csb_write));
+
 	process_csb(engine);
 
 	if (unlikely(READ_ONCE(engine->execlists.error_interrupt))) {
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux