[Intel-gfx] [PATCH] drm/i915/selftests: Use msecs_to_jiffies() for an explicit ms timeout

Chris Wilson chris at chris-wilson.co.uk
Wed Nov 21 11:58:29 UTC 2018


Make the wait for the evict kthread use an explicit timeout rather than
a handwaved jiffie value so it is consistent across all platforms.

References: https://bugs.freedesktop.org/show_bug.cgi?id=108735
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
index defe671130ab..1f76257641f2 100644
--- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
@@ -1171,7 +1171,7 @@ static int __igt_reset_evict_vma(struct drm_i915_private *i915,
 		struct igt_wedge_me w;
 
 		/* The reset, even indirectly, should take less than 10ms. */
-		igt_wedge_on_timeout(&w, i915, HZ / 10 /* 100ms timeout*/)
+		igt_wedge_on_timeout(&w, i915, msecs_to_jiffies(100))
 			err = kthread_stop(tsk);
 
 		put_task_struct(tsk);
-- 
2.19.1



More information about the Intel-gfx mailing list