All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_gt: Move assert with setting 'reset' parameter after IGT env check
@ 2019-01-23 14:04 Katarzyna Dec
  2019-01-23 14:12 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Katarzyna Dec @ 2019-01-23 14:04 UTC (permalink / raw)
  To: igt-dev

We are trying to set reset parameter earlier than checking IGT env.
Let's move it after checking IGT env to avoid setting reset parameter
when hang injection is disabled.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
---
 lib/igt_gt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index dd28d821..64669672 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -170,15 +170,15 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags)
 	 */
 	igt_require_gem(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));
 
+	igt_assert(igt_sysfs_set_parameter
+		   (fd, "reset", "%d", INT_MAX /* any reset method */));
+
 	if ((flags & HANG_ALLOW_CAPTURE) == 0) {
 		param.param = I915_CONTEXT_PARAM_NO_ERROR_CAPTURE;
 		param.value = 1;
-- 
2.17.2

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

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

end of thread, other threads:[~2019-01-23 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 14:04 [igt-dev] [PATCH i-g-t] lib/igt_gt: Move assert with setting 'reset' parameter after IGT env check Katarzyna Dec
2019-01-23 14:12 ` Chris Wilson
2019-01-23 16:54   ` Daniel Vetter
2019-01-23 15:17 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-23 17:59 ` [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.