Fixes failed assertion on non-i915 devices. Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@xxxxxxxxx> --- lib/igt_gt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/igt_gt.c b/lib/igt_gt.c index 9cb07c2..825ea52 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -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; -- 2.7.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx