@@ -2915,8 +2915,10 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked)
unsigned long flags;
u32 seqno;
- 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_irqsave(&engine->fence_lock, flags);
@@ -2924,6 +2926,7 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked)
if (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) {
@@ -2937,8 +2940,10 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked)
*/
list_del_init(&req->signal_link);
- if (!req->cancelled)
+ if (!req->cancelled) {
fence_signal_locked(&req->fence);
+ trace_i915_gem_request_complete(req);
+ }
if (req->irq_enabled) {
req->engine->irq_put(req->engine);
@@ -999,7 +999,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++;
i915_gem_request_notify(engine, false);
@@ -550,23 +550,27 @@ 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)
__field(u32, ring)
__field(u32, seqno)
+ __field(bool, is_empty)
),
TP_fast_assign(
__entry->dev = engine->dev->primary->index;
__entry->ring = engine->id;
- __entry->seqno = engine->get_seqno(engine);
+ __entry->seqno = seqno;
+ __entry->is_empty =
+ list_empty(&engine->fence_signal_list);
),
- TP_printk("dev=%u, ring=%u, seqno=%u",
- __entry->dev, __entry->ring, __entry->seqno)
+ TP_printk("dev=%u, ring=%u, seqno=%u, empty=%d",
+ __entry->dev, __entry->ring, __entry->seqno,
+ __entry->is_empty)
);
DEFINE_EVENT(i915_gem_request, i915_gem_request_retire,