public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] i915/gem_eio: Break early for small rings
@ 2019-07-29 12:27 Chris Wilson
  2019-07-29 14:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  2019-08-06 21:38 ` [Intel-gfx] [igt-dev] [PATCH i-g-t] " Matthew Auld
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2019-07-29 12:27 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If the shared legacy ringbuffer is too small to fit 64 new contexts, it
will hang and report -EIO before we are expecting it. Accommodate this
eio as it part of the ABI we are testing.

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

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 4d7362d8f..dcbcefa97 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -559,6 +559,7 @@ static void test_inflight_contexts(int fd, unsigned int wait)
 		const uint32_t bbe = MI_BATCH_BUFFER_END;
 		struct drm_i915_gem_exec_object2 obj[2];
 		struct drm_i915_gem_execbuffer2 execbuf;
+		unsigned int count;
 		igt_spin_t *hang;
 		uint32_t ctx[64];
 		int fence[64];
@@ -587,16 +588,19 @@ static void test_inflight_contexts(int fd, unsigned int wait)
 		execbuf.buffer_count = 2;
 		execbuf.flags = engine | I915_EXEC_FENCE_OUT;
 
+		count = 0;
 		for (unsigned int n = 0; n < ARRAY_SIZE(fence); n++) {
 			execbuf.rsvd1 = ctx[n];
-			gem_execbuf_wr(fd, &execbuf);
+			if (__gem_execbuf_wr(fd, &execbuf))
+				break; /* small shared ring */
 			fence[n] = execbuf.rsvd2 >> 32;
 			igt_assert(fence[n] != -1);
+			count++;
 		}
 
 		check_wait(fd, obj[1].handle, wait, NULL);
 
-		for (unsigned int n = 0; n < ARRAY_SIZE(fence); n++) {
+		for (unsigned int n = 0; n < count; n++) {
 			igt_assert_eq(sync_fence_status(fence[n]), -EIO);
 			close(fence[n]);
 		}
-- 
2.22.0

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

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

end of thread, other threads:[~2019-08-06 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-29 12:27 [igt-dev] [PATCH i-g-t] i915/gem_eio: Break early for small rings Chris Wilson
2019-07-29 14:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-08-06 21:38 ` [Intel-gfx] [igt-dev] [PATCH i-g-t] " Matthew Auld

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