public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] tests/gem_exec_await: Relax the busy spinner
@ 2018-11-19 15:22 Tvrtko Ursulin
  2018-11-19 15:22 ` [igt-dev] [PATCH i-g-t 2/2] tests/gem_exec_await: Add a memory pressure subtest Tvrtko Ursulin
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2018-11-19 15:22 UTC (permalink / raw)
  To: igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Add some nop instructions between recursive batch buffer start calls to
give system some breathing room. Without these, especially when coupled
with memory pressure, false GPU hangs can be observed caused by the
inability of the chip to cope.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106680
---
 tests/i915/gem_exec_await.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/i915/gem_exec_await.c b/tests/i915/gem_exec_await.c
index 5cfeb8ec8bfa..3ea5b5903c6b 100644
--- a/tests/i915/gem_exec_await.c
+++ b/tests/i915/gem_exec_await.c
@@ -63,6 +63,7 @@ static void xchg_obj(void *array, unsigned i, unsigned j)
 static void wide(int fd, int ring_size, int timeout, unsigned int flags)
 {
 	const uint32_t bbe = MI_BATCH_BUFFER_END;
+	const unsigned int num_nops = 1000;
 	const int gen = intel_gen(intel_get_drm_devid(fd));
 	struct {
 		struct drm_i915_gem_exec_object2 *obj;
@@ -123,7 +124,7 @@ static void wide(int fd, int ring_size, int timeout, unsigned int flags)
 		exec[e].execbuf.buffer_count = 2;
 
 		exec[e].reloc.target_handle = 1; /* recurse */
-		exec[e].reloc.offset = sizeof(uint32_t);
+		exec[e].reloc.offset = (1 + num_nops) * sizeof(uint32_t);
 		exec[e].reloc.read_domains = I915_GEM_DOMAIN_COMMAND;
 		if (gen < 4)
 			exec[e].reloc.delta = 1;
@@ -162,7 +163,7 @@ static void wide(int fd, int ring_size, int timeout, unsigned int flags)
 			gem_set_domain(fd, exec[e].exec[1].handle,
 				       I915_GEM_DOMAIN_WC, I915_GEM_DOMAIN_WC);
 
-			i = 0;
+			i = num_nops;
 			exec[e].cmd[i] = MI_BATCH_BUFFER_START;
 			if (gen >= 8) {
 				exec[e].cmd[i] |= 1 << 8 | 1;
@@ -200,7 +201,7 @@ static void wide(int fd, int ring_size, int timeout, unsigned int flags)
 		count += nengine;
 
 		for (unsigned e = 0; e < nengine; e++)
-			exec[e].cmd[0] = MI_BATCH_BUFFER_END;
+			exec[e].cmd[num_nops] = MI_BATCH_BUFFER_END;
 		__sync_synchronize();
 	}
 
-- 
2.19.1

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

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

end of thread, other threads:[~2018-11-19 21:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-19 15:22 [igt-dev] [PATCH i-g-t 1/2] tests/gem_exec_await: Relax the busy spinner Tvrtko Ursulin
2018-11-19 15:22 ` [igt-dev] [PATCH i-g-t 2/2] tests/gem_exec_await: Add a memory pressure subtest Tvrtko Ursulin
2018-11-19 15:36   ` Chris Wilson
2018-11-19 15:54     ` Tvrtko Ursulin
2018-11-19 17:07       ` [Intel-gfx] " Chris Wilson
2018-11-19 15:28 ` [igt-dev] [PATCH i-g-t 1/2] tests/gem_exec_await: Relax the busy spinner Chris Wilson
2018-11-19 15:33   ` Tvrtko Ursulin
2018-11-19 16:18     ` Chris Wilson
2018-11-19 19:18       ` Tvrtko Ursulin
2018-11-19 19:34         ` Chris Wilson
2018-11-19 16:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
2018-11-19 21:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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