From: John Harrison <John.C.Harrison@xxxxxxxxx> For: VIZ-2021 Signed-off-by: Dave Gordon <david.s.gordon@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem.c | 8 +++++--- drivers/gpu/drm/i915/i915_scheduler.c | 2 +- drivers/gpu/drm/i915/i915_trace.h | 31 +++++++++++++++++++------------ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d4a236f..d6094f1 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2878,24 +2878,25 @@ void i915_gem_request_notify(struct intel_engine_cs *ring, bool fence_locked) u32 seqno; if (list_empty(&ring->fence_signal_list)) { - trace_i915_gem_request_notify(ring, 0); + trace_i915_gem_request_notify(ring, 0, 0, 0); return; } seqno = ring->get_seqno(ring, false); preempt = i915_scheduler_is_ring_preempting(ring) ? intel_read_status_page(ring, I915_PREEMPTIVE_ACTIVE_SEQNO) : 0; - trace_i915_gem_request_notify(ring, seqno); if (preempt) { u32 preempt_done; preempt_done = intel_read_status_page(ring, I915_PREEMPTIVE_DONE_SEQNO); + trace_i915_gem_request_notify(ring, seqno, preempt, preempt_done); /* A mismatch indicates an in-progress operation so ignore it for now */ if (preempt_done != preempt) preempt = 0; - } + } else + trace_i915_gem_request_notify(ring, seqno, 0, 0); /* Is there anything new to process? */ if ((seqno == ring->last_irq_seqno) && !preempt) @@ -2955,6 +2956,7 @@ void i915_gem_request_notify(struct intel_engine_cs *ring, bool fence_locked) preempt = intel_read_status_page(ring, I915_PREEMPTIVE_ACTIVE_SEQNO); preempt_done = intel_read_status_page(ring, I915_PREEMPTIVE_DONE_SEQNO); + trace_i915_gem_request_notify(ring, seqno, preempt, preempt_done); /* A mismatch indicates an in-progress operation so ignore it for now */ if (preempt_done != preempt) diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c index 9bc9614..b20b763 100644 --- a/drivers/gpu/drm/i915/i915_scheduler.c +++ b/drivers/gpu/drm/i915/i915_scheduler.c @@ -593,7 +593,7 @@ bool i915_scheduler_notify_request(struct drm_i915_gem_request *req, unsigned long flags; bool result; - trace_i915_scheduler_landing(req); + trace_i915_scheduler_landing(req, preempt); spin_lock_irqsave(&scheduler->lock, flags); diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index 73b0ee9..61367e4 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h @@ -569,13 +569,16 @@ DEFINE_EVENT(i915_gem_request, i915_gem_request_add, ); TRACE_EVENT(i915_gem_request_notify, - TP_PROTO(struct intel_engine_cs *ring, uint32_t seqno), - TP_ARGS(ring, seqno), + TP_PROTO(struct intel_engine_cs *ring, uint32_t seqno, + uint32_t preempt, uint32_t preempt_done), + TP_ARGS(ring, seqno, preempt, preempt_done), TP_STRUCT__entry( __field(u32, dev) __field(u32, ring) __field(u32, seqno) + __field(u32, preempt) + __field(u32, preempt_done) __field(bool, is_empty) ), @@ -583,12 +586,14 @@ TRACE_EVENT(i915_gem_request_notify, __entry->dev = ring->dev->primary->index; __entry->ring = ring->id; __entry->seqno = seqno; + __entry->preempt = preempt; + __entry->preempt = preempt_done; __entry->is_empty = list_empty(&ring->fence_signal_list); ), - TP_printk("dev=%u, ring=%u, seqno=%u, empty=%d", + TP_printk("dev=%u, ring=%u, seqno=%u, preempt=%u, preempt_done=%u, empty=%d", __entry->dev, __entry->ring, __entry->seqno, - __entry->is_empty) + __entry->preempt, __entry->preempt_done, __entry->is_empty) ); DEFINE_EVENT(i915_gem_request, i915_gem_request_retire, @@ -887,25 +892,27 @@ TRACE_EVENT(i915_scheduler_unfly, ); TRACE_EVENT(i915_scheduler_landing, - TP_PROTO(struct drm_i915_gem_request *req), - TP_ARGS(req), + TP_PROTO(struct drm_i915_gem_request *req, bool preempt), + TP_ARGS(req, preempt), TP_STRUCT__entry( __field(u32, ring) __field(u32, uniq) __field(u32, seqno) __field(u32, status) + __field(bool, preempt) ), TP_fast_assign( - __entry->ring = req->ring->id; - __entry->uniq = req->uniq; - __entry->seqno = req->seqno; - __entry->status = req->scheduler_qe ? req->scheduler_qe->status : ~0U; + __entry->ring = req->ring->id; + __entry->uniq = req->uniq; + __entry->seqno = req->seqno; + __entry->status = req->scheduler_qe ? req->scheduler_qe->status : ~0U; + __entry->preempt = preempt; ), - TP_printk("ring=%d, uniq=%d, seqno=%d, status=%d", - __entry->ring, __entry->uniq, __entry->seqno, __entry->status) + TP_printk("ring=%d, uniq=%d, seqno=%d, status=%d, preempt=%d", + __entry->ring, __entry->uniq, __entry->seqno, __entry->status, __entry->preempt) ); TRACE_EVENT(i915_scheduler_remove, -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx