From a19e0b93201c97e95dcc19e894b63e0abeeb4dea Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 5 May 2016 16:04:53 +0100 Subject: Mush: query stats --- drivers/gpu/drm/i915/i915_scheduler.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c index 723560d65361..4fde0829e260 100644 --- a/drivers/gpu/drm/i915/i915_scheduler.c +++ b/drivers/gpu/drm/i915/i915_scheduler.c @@ -1958,12 +1958,16 @@ int i915_scheduler_query_stats(struct intel_engine_cs *engine, stats->counts[node->status]++; } - WARN(stats->counts[I915_SQS_QUEUED] != scheduler->counts[engine->id].queued, - "Queued count mis-match: %d vs %d!\n", - stats->counts[I915_SQS_QUEUED], scheduler->counts[engine->id].queued); - WARN(stats->counts[I915_SQS_FLYING] != scheduler->counts[engine->id].flying, - "Flying count mis-match: %d vs %d!\n", - stats->counts[I915_SQS_FLYING], scheduler->counts[engine->id].flying); + WARN((stats->counts[I915_SQS_QUEUED] + stats->counts[I915_SQS_PREEMPTED]) + != scheduler->counts[engine->id].queued, + "Queued count mis-match: %d + %d vs %d!\n", + stats->counts[I915_SQS_QUEUED], stats->counts[I915_SQS_PREEMPTED], + scheduler->counts[engine->id].queued); + WARN((stats->counts[I915_SQS_FLYING] + stats->counts[I915_SQS_OVERTAKING]) + != scheduler->counts[engine->id].flying, + "Flying count mis-match: %d + %d vs %d!\n", + stats->counts[I915_SQS_FLYING], stats->counts[I915_SQS_OVERTAKING], + scheduler->counts[engine->id].flying); spin_unlock_irq(&scheduler->lock); -- cgit v1.2.3