@@ -166,14 +166,15 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags)
struct drm_i915_gem_context_param param;
unsigned ban;
+ if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false))
+ igt_require(has_gpu_reset(fd));
+
igt_assert(igt_sysfs_set_parameter
(fd, "reset", "%d", INT_MAX /* any reset method */));
if (!igt_check_boolean_env_var("IGT_HANG", true))
igt_skip("hang injection disabled by user");
gem_context_require_bannable(fd);
- if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false))
- igt_require(has_gpu_reset(fd));
param.ctx_id = ctx;
param.size = 0;
Fixes failed assertion on non-i915 devices. Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> --- lib/igt_gt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)