All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 01/13] i915/gem_mocs_settings: Allow hangs around reset tests
@ 2019-02-04  8:36 ` Chris Wilson
  0 siblings, 0 replies; 46+ messages in thread
From: Chris Wilson @ 2019-02-04  8:36 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

To inject a GPU hang, we should ask the kernel first if it is legal to
do so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_mocs_settings.c | 54 +++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 20 deletions(-)

diff --git a/tests/i915/gem_mocs_settings.c b/tests/i915/gem_mocs_settings.c
index 967223f1b..5b3b6bc1e 100644
--- a/tests/i915/gem_mocs_settings.c
+++ b/tests/i915/gem_mocs_settings.c
@@ -453,26 +453,40 @@ igt_main
 			continue;
 
 		for (unsigned mode = NONE; mode < MAX_MOCS_TEST_MODES; mode++) {
-			for (unsigned flags = 0; flags < ALL_MOCS_FLAGS + 1; flags++) {
-				/* Trying to test non-render engines for dirtying MOCS
-				 * values from one context having effect on different
-				 * context is bound to fail - only render engine is
-				 * doing context save/restore of MOCS registers.
-				 * Let's also limit testing values on non-default
-				 * contexts to render-only.
-				 */
-				if (flags && e->exec_id != I915_EXEC_RENDER)
-					continue;
-
-				igt_subtest_f("mocs-%s%s%s-%s",
-					      test_modes[mode],
-					      flags & MOCS_NON_DEFAULT_CTX ? "-ctx": "",
-					      flags & MOCS_DIRTY_VALUES ? "-dirty" : "",
-					      e->name) {
-					if (flags & (MOCS_NON_DEFAULT_CTX | MOCS_DIRTY_VALUES))
-						gem_require_contexts(fd);
-
-					run_test(fd, e->exec_id | e->flags, flags, mode);
+			igt_subtest_group {
+				igt_hang_t hang = {};
+
+				igt_fixture {
+					if (mode == RESET)
+						hang = igt_allow_hang(fd, 0, 0);
+				}
+
+				for (unsigned flags = 0; flags < ALL_MOCS_FLAGS + 1; flags++) {
+					/* Trying to test non-render engines for dirtying MOCS
+					 * values from one context having effect on different
+					 * context is bound to fail - only render engine is
+					 * doing context save/restore of MOCS registers.
+					 * Let's also limit testing values on non-default
+					 * contexts to render-only.
+					 */
+					if (flags && e->exec_id != I915_EXEC_RENDER)
+						continue;
+
+					igt_subtest_f("mocs-%s%s%s-%s",
+						      test_modes[mode],
+						      flags & MOCS_NON_DEFAULT_CTX ? "-ctx": "",
+						      flags & MOCS_DIRTY_VALUES ? "-dirty" : "",
+						      e->name) {
+						if (flags & (MOCS_NON_DEFAULT_CTX | MOCS_DIRTY_VALUES))
+							gem_require_contexts(fd);
+
+						run_test(fd, e->exec_id | e->flags, flags, mode);
+					}
+				}
+
+				igt_fixture {
+					if (mode == RESET)
+						igt_disallow_hang(fd, hang);
 				}
 			}
 		}
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-02-05 15:09 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04  8:36 [PATCH i-g-t 01/13] i915/gem_mocs_settings: Allow hangs around reset tests Chris Wilson
2019-02-04  8:36 ` [igt-dev] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 02/13] lib/i915: Pretty print busy stats support Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 03/13] i915/perf_pmu: Query for enhanced busyness tracking Chris Wilson
2019-02-04  8:36   ` [Intel-gfx] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 04/13] lib/i915: Pretty print HW semaphores Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 05/13] lib: Add GPU power measurement Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04 10:05   ` Katarzyna Dec
2019-02-04 10:05     ` Katarzyna Dec
2019-02-04 10:25     ` Chris Wilson
2019-02-04 10:25       ` Chris Wilson
2019-02-05 14:41       ` Ville Syrjälä
2019-02-05 14:41         ` Ville Syrjälä
2019-02-05 15:09         ` Chris Wilson
2019-02-05 15:09           ` Chris Wilson
2019-02-05 12:27   ` Katarzyna Dec
2019-02-05 12:31     ` Chris Wilson
2019-02-05 13:44       ` Katarzyna Dec
2019-02-04  8:36 ` [PATCH i-g-t 06/13] i915/gem_exec_schedule: Measure semaphore power consumption Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-05 12:50   ` Katarzyna Dec
2019-02-05 12:53     ` Chris Wilson
2019-02-05 13:57       ` Katarzyna Dec
2019-02-04  8:36 ` [PATCH i-g-t 07/13] i915/gem_exec_whisper: Measure total power consumed Chris Wilson
2019-02-04  8:36   ` [Intel-gfx] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 08/13] i915/gem_exec_latency: Normalize results into ns Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 09/13] i915/gem_exec_latency: Eliminate the wakeup penalty Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 10/13] i915/gem_exec_latency: Robustify measurements Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 11/13] i915/gem_exec_schedule: Verify that using HW semaphores doesn't block Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 12/13] i915/gem_exec_nop: poll-sequential requires ordering between rings Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04  8:36 ` [PATCH i-g-t 13/13] i915/gem_sync: Make switch-default asymmetric Chris Wilson
2019-02-04  8:36   ` [igt-dev] " Chris Wilson
2019-02-04  9:16 ` [PATCH i-g-t 01/13] i915/gem_mocs_settings: Allow hangs around reset tests Tvrtko Ursulin
2019-02-04  9:16   ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin
2019-02-04  9:31 ` [igt-dev] " Katarzyna Dec
2019-02-04  9:31   ` Katarzyna Dec
2019-02-04  9:55 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/13] " Patchwork
2019-02-04 10:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.