[PATCH] drm/i915/execlists: Move trace in/out to submission and completion

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

 



Currently we record the submission of the context/rq to the HW early and
so have the consequential of having a false set of tracepoints for when
we decide to elide the submission. To compensate, and hide the impact of
the elision, only record the entry/exit points of the active contexts.

In doing so, we lose track of which port the request is submitted to,
and we just have the information about the context activation.

Alternatively, we could move the entry tracepoint to submit_ports such
that we only emit a tracepoint for when we submit the context to HW.
Similarly, we would need to only emit the out tracepoint when it is
removed from the HW (and not for the elision).

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index cf6c43bd540a..2dce4353df62 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1226,6 +1226,7 @@ __execlists_schedule_in(struct i915_request *rq)
 	__intel_gt_pm_get(engine->gt);
 	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
 	intel_engine_context_in(engine);
+	trace_i915_request_in(rq, 0);
 
 	return engine;
 }
@@ -1237,7 +1238,6 @@ execlists_schedule_in(struct i915_request *rq, int idx)
 	struct intel_engine_cs *old;
 
 	GEM_BUG_ON(!intel_engine_pm_is_awake(rq->engine));
-	trace_i915_request_in(rq, idx);
 
 	old = READ_ONCE(ce->inflight);
 	do {
@@ -1272,6 +1272,8 @@ __execlists_schedule_out(struct i915_request *rq,
 	 * refrain from doing non-trivial work here.
 	 */
 
+	trace_i915_request_out(rq);
+
 	/*
 	 * If we have just completed this context, the engine may now be
 	 * idle and we want to re-enter powersaving.
@@ -1305,8 +1307,6 @@ execlists_schedule_out(struct i915_request *rq)
 	struct intel_context * const ce = rq->context;
 	struct intel_engine_cs *cur, *old;
 
-	trace_i915_request_out(rq);
-
 	old = READ_ONCE(ce->inflight);
 	do
 		cur = ptr_unmask_bits(old, 2) ? ptr_dec(old) : NULL;
-- 
2.25.0

_______________________________________________
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