summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2014-11-04 17:46:02 +0000
committerJohn Harrison <John.C.Harrison@Intel.com>2016-06-30 15:06:30 +0100
commit32bb68c73dc8d42845a677a9cb4a8940e18057ee (patch)
tree4daa241a2d1638e06c6d301fb77ba15ac5444141
parentdd06b1c49c696f7f569f04d968a483cf0789bca6 (diff)
drm/i915: Updated request structure tracing
Added the '_complete' trace event which occurs when a fence/request is signaled as complete. Also moved the notify event from the IRQ handler code to inside the notify function itself. v3: Added the current ring seqno to the notify trace point. v5: Line wrapping to keep the style checker happy. v7: Updated to newer nightly (lots of ring -> engine renaming). v10: Dropped the 'is_empty' flag from trace_i915_gem_request_notify() as it is now redundant - 'seqno == 0' is equivalent. [Review comments from Tvrtko Ursulin] v10b: Re-based due to change in previous patch. For: VIZ-5190 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c9
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c1
-rw-r--r--drivers/gpu/drm/i915/i915_trace.h6
3 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a3c38188b4ca..55295ebb9077 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2969,8 +2969,10 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked,
* not-empty. And a false not-empty is not an issue - it would just be
* the same as not doing the early exit test at all.
*/
- if (list_empty(&engine->fence_signal_list))
+ if (list_empty(&engine->fence_signal_list)) {
+ trace_i915_gem_request_notify(engine, 0);
return;
+ }
if (!fence_locked)
spin_lock_irq(&engine->fence_lock);
@@ -2978,6 +2980,7 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked,
if (!lazy_coherency && engine->irq_seqno_barrier)
engine->irq_seqno_barrier(engine);
seqno = engine->get_seqno(engine);
+ trace_i915_gem_request_notify(engine, seqno);
list_for_each_entry_safe(req, req_next, &engine->fence_signal_list, signal_link) {
if (!req->cancelled && !i915_seqno_passed(seqno, req->seqno))
@@ -2994,8 +2997,10 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked,
req->irq_enabled = false;
}
- if (!req->cancelled)
+ if (!req->cancelled) {
fence_signal_locked(&req->fence);
+ trace_i915_gem_request_complete(req);
+ }
i915_gem_request_unreference(req);
}
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 77fca0b4e329..9c0ffab9d542 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -979,7 +979,6 @@ static void notify_ring(struct intel_engine_cs *engine)
if (!intel_engine_initialized(engine))
return;
- trace_i915_gem_request_notify(engine);
engine->user_interrupts++;
queue_work(engine->i915->req_wq, &engine->request_work);
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 6768db032f84..ef4c573643d3 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -546,8 +546,8 @@ DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
);
TRACE_EVENT(i915_gem_request_notify,
- TP_PROTO(struct intel_engine_cs *engine),
- TP_ARGS(engine),
+ TP_PROTO(struct intel_engine_cs *engine, uint32_t seqno),
+ TP_ARGS(engine, seqno),
TP_STRUCT__entry(
__field(u32, dev)
@@ -558,7 +558,7 @@ TRACE_EVENT(i915_gem_request_notify,
TP_fast_assign(
__entry->dev = engine->i915->dev->primary->index;
__entry->ring = engine->id;
- __entry->seqno = engine->get_seqno(engine);
+ __entry->seqno = seqno;
),
TP_printk("dev=%u, ring=%u, seqno=%u",