igt/gem_exec_nop: Relax parallel assertion for short rings
On bdw, the render ring becomes full and limits dispatch across all rings.
Adjust the expected latency to take this into account.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index 3d44d18..533082a 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -126,7 +126,7 @@
unsigned nengine;
unsigned engine;
unsigned long count;
- double time, max = 0, sum = 0;
+ double time, max = 0, min = HUGE_VAL, sum = 0;
const char *name;
nengine = 0;
@@ -139,6 +139,8 @@
name = e__->name;
max = time;
}
+ if (time < min)
+ min = time;
sum += time;
engines[nengine++] = engine;
}
@@ -179,7 +181,13 @@
time = elapsed(&start, &now) / count;
igt_info("All (%d engines): %'lu cycles, average %.3fus per cycle\n",
nengine, count, 1e6*time);
- igt_assert(time < 2*sum/nengine); /* ensure parallel execution */
+
+ /* The rate limiting step is how fast the slowest engine can
+ * its queue of requests, if we wait upon a full ring all dispatch
+ * is frozen. So in general we cannot go faster than the slowest
+ * engine, but we should equally not go any slower.
+ */
+ igt_assert(time < max + min); /* ensure parallel execution */
}
igt_main