public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/9] i915/gem_exec_schedule: Limit the plug to fit small rings
@ 2019-08-13  6:20 Chris Wilson
  2019-08-13  6:20 ` [igt-dev] [PATCH i-g-t 2/9] i915/gem_eio: Restrict number of batches of submitted Chris Wilson
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Chris Wilson @ 2019-08-13  6:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If we are not running with a scheduler, we are using a global ringbuffer
which may not accommodate 16 extra batches. Fortunately, we only need
one such batch to block the submission queue as without a scheduler, it
is in order submission (and so the batch is after the main setup
anyway!).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_exec_schedule.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 6e8466299..058102103 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -164,8 +164,13 @@ static uint32_t create_highest_priority(int fd)
 static void unplug_show_queue(int fd, struct igt_cork *c, unsigned int engine)
 {
 	igt_spin_t *spin[MAX_ELSP_QLEN];
+	int max = MAX_ELSP_QLEN;
 
-	for (int n = 0; n < ARRAY_SIZE(spin); n++) {
+	/* If no scheduler, all batches are emitted in submission order */
+	if (!gem_scheduler_enabled(fd))
+		max = 1;
+
+	for (int n = 0; n < max; n++) {
 		const struct igt_spin_factory opts = {
 			.ctx = create_highest_priority(fd),
 			.engine = engine,
@@ -177,7 +182,7 @@ static void unplug_show_queue(int fd, struct igt_cork *c, unsigned int engine)
 	igt_cork_unplug(c); /* batches will now be queued on the engine */
 	igt_debugfs_dump(fd, "i915_engine_info");
 
-	for (int n = 0; n < ARRAY_SIZE(spin); n++)
+	for (int n = 0; n < max; n++)
 		igt_spin_free(fd, spin[n]);
 
 }
-- 
2.23.0.rc1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-08-13 15:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-13  6:20 [igt-dev] [PATCH i-g-t 1/9] i915/gem_exec_schedule: Limit the plug to fit small rings Chris Wilson
2019-08-13  6:20 ` [igt-dev] [PATCH i-g-t 2/9] i915/gem_eio: Restrict number of batches of submitted Chris Wilson
2019-08-13 14:21   ` [igt-dev] [Intel-gfx] " Andi Shyti
2019-08-13  6:20 ` [igt-dev] [PATCH i-g-t 3/9] i915/gem_mmap_gtt: Test mmap_offset lifetime Chris Wilson
2019-08-13  6:20 ` [igt-dev] [PATCH i-g-t 4/9] i915/gem_shrink: Make some pages dirty Chris Wilson
2019-08-13 15:37   ` Andi Shyti
2019-08-13  6:20 ` [igt-dev] [PATCH i-g-t 5/9] i915/gem_userptr_blits: Apply some THP pressure Chris Wilson
2019-08-13 15:37   ` [Intel-gfx] " Andi Shyti
2019-08-13  6:20 ` [Intel-gfx] [PATCH i-g-t 6/9] i915/gem_exec_schedule: Check timeslice Chris Wilson
2019-08-13  6:20 ` [igt-dev] [PATCH i-g-t 7/9] i915/perf_pmu: Flush idle work before waiting for suspend Chris Wilson
2019-08-13  6:20 ` [igt-dev] [PATCH i-g-t 8/9] Force spin-batch to cause a hang as required Chris Wilson
2019-08-13  6:20 ` [igt-dev] [PATCH i-g-t 9/9] i915/gem_ctx_engine: Drip feed requests into 'independent' Chris Wilson
2019-08-13 15:37   ` Andi Shyti
2019-08-13  7:22 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/9] i915/gem_exec_schedule: Limit the plug to fit small rings Patchwork
2019-08-13 14:20 ` [igt-dev] [PATCH i-g-t 1/9] " Andi Shyti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox