Commit b9b77426 authored by Chris Wilson's avatar Chris Wilson

drm/i915/execlists: Emit i915_trace_request_out for preemption

Move the tracepoint into the common execlists_context_schedule_out() and
call it from preemption completion as well. A small bit of refactoring
code should help with when tracing, or else we end up with requests
mysteriously disappearing and some being emitted to HW multiple times.
Reported-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180502230202.6848-1-chris@chris-wilson.co.uk
parent a89d1f92
...@@ -398,10 +398,11 @@ execlists_context_schedule_in(struct i915_request *rq) ...@@ -398,10 +398,11 @@ execlists_context_schedule_in(struct i915_request *rq)
} }
static inline void static inline void
execlists_context_schedule_out(struct i915_request *rq) execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
{ {
intel_engine_context_out(rq->engine); intel_engine_context_out(rq->engine);
execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT); execlists_context_status_change(rq, status);
trace_i915_request_out(rq);
} }
static void static void
...@@ -772,9 +773,7 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists) ...@@ -772,9 +773,7 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists)
intel_engine_get_seqno(rq->engine)); intel_engine_get_seqno(rq->engine));
GEM_BUG_ON(!execlists->active); GEM_BUG_ON(!execlists->active);
intel_engine_context_out(rq->engine); execlists_context_schedule_out(rq,
execlists_context_status_change(rq,
i915_request_completed(rq) ? i915_request_completed(rq) ?
INTEL_CONTEXT_SCHEDULE_OUT : INTEL_CONTEXT_SCHEDULE_OUT :
INTEL_CONTEXT_SCHEDULE_PREEMPTED); INTEL_CONTEXT_SCHEDULE_PREEMPTED);
...@@ -1105,8 +1104,8 @@ static void execlists_submission_tasklet(unsigned long data) ...@@ -1105,8 +1104,8 @@ static void execlists_submission_tasklet(unsigned long data)
*/ */
GEM_BUG_ON(!i915_request_completed(rq)); GEM_BUG_ON(!i915_request_completed(rq));
execlists_context_schedule_out(rq); execlists_context_schedule_out(rq,
trace_i915_request_out(rq); INTEL_CONTEXT_SCHEDULE_OUT);
i915_request_put(rq); i915_request_put(rq);
GEM_TRACE("%s completed ctx=%d\n", GEM_TRACE("%s completed ctx=%d\n",
......
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