Skip to content

Commit

Permalink
drm/i915: Fix tracing of submit seqno
Browse files Browse the repository at this point in the history
We pre-increment the timeline->seqno when handing it to the request,
make sure the GEM_TRACE takes this into account. Otherwise, it appears
that we go backwards over a preemption point:

1d..1 157681077us : __i915_request_unsubmit: vcs0 fence 75e:3 <- global_seqno 17
0d.s1 157681113us : __i915_request_submit: vcs0 fence 75e:3 -> global_seqno 16

Fixes: d9b13c4 ("drm/i915: Trace GEM steps between submit and wedging")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180322110059.4467-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Mar 22, 2018
1 parent d544e91 commit 0e59c20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ void __i915_request_submit(struct i915_request *request)
GEM_TRACE("%s fence %llx:%d -> global_seqno %d\n",
request->engine->name,
request->fence.context, request->fence.seqno,
engine->timeline->seqno);
engine->timeline->seqno + 1);

GEM_BUG_ON(!irqs_disabled());
lockdep_assert_held(&engine->timeline->lock);
Expand Down

0 comments on commit 0e59c20

Please sign in to comment.