@@ -599,6 +599,7 @@ submit_notify(struct i915_sw_fence *fence, enum i915_sw_fence_notify state)
rcu_read_lock();
request->engine->submit_request(request);
rcu_read_unlock();
+ atomic_dec(&request->engine->submitted);
break;
case FENCE_FREE:
@@ -1056,6 +1057,8 @@ void __i915_add_request(struct drm_i915_gem_request *request, bool flush_caches)
if (engine->schedule)
engine->schedule(request, request->ctx->priority);
+ atomic_inc(&engine->submitted);
+
local_bh_disable();
i915_sw_fence_commit(&request->submit);
local_bh_enable(); /* Kick the execlists tasklet if just scheduled */
@@ -1725,12 +1725,13 @@ void intel_engine_dump(struct intel_engine_cs *engine,
if (i915_terminally_wedged(&engine->i915->gpu_error))
drm_printf(m, "*** WEDGED ***\n");
- drm_printf(m, "\tcurrent seqno %x, last %x, hangcheck %x [%d ms], inflight %d, queued %u\n",
+ drm_printf(m, "\tcurrent seqno %x, last %x, hangcheck %x [%d ms], inflight %d, submitted %u, queued %u\n",
intel_engine_get_seqno(engine),
intel_engine_last_submit(engine),
engine->hangcheck.seqno,
jiffies_to_msecs(jiffies - engine->hangcheck.action_timestamp),
engine->timeline->inflight_seqnos,
+ atomic_read(&engine->submitted),
engine->queued);
drm_printf(m, "\tReset count: %d (global %d)\n",
i915_reset_engine_count(error, engine),
@@ -302,6 +302,15 @@ struct intel_engine_cs {
struct intel_ring *buffer;
struct intel_timeline *timeline;
+
+ /**
+ * @submitted: Number of submitted requests with dependencies.
+ *
+ * Count of requests waiting for dependencies before they can be
+ * submitted to the backend.
+ */
+
+ atomic_t submitted;
/**
* @queued: Number of runnable requests submitted to the backend.
*