[Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_exec: Protect norecovery from being banned

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 5 11:25:36 UTC 2021


Disable banning as we deliberately inject GPU resets to test norecovery
handling.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Venkata Ramana Nayana <venkata.ramana.nayana at intel.com>
---
 tests/i915/gem_ctx_exec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index 897761856..c80a98473 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -171,14 +171,16 @@ static void norecovery(int i915)
 	for (int pass = 1; pass >= 0; pass--) {
 		struct drm_i915_gem_context_param param = {
 			.ctx_id = gem_context_create(i915),
-			.param = I915_CONTEXT_PARAM_RECOVERABLE,
-			.value = pass,
+			.param = I915_CONTEXT_PARAM_BANNABLE,
 		};
 		int expect = pass == 0 ? -EIO : 0;
 		igt_spin_t *spin;
 
 		gem_context_set_param(i915, &param);
 
+		param.param = I915_CONTEXT_PARAM_RECOVERABLE;
+		param.value = pass;
+		gem_context_set_param(i915, &param);
 		param.value = !pass;
 		gem_context_get_param(i915, &param);
 		igt_assert_eq(param.value, pass);
-- 
2.30.0



More information about the Intel-gfx mailing list