[PATCH 3/5] drm/i915/selftests: Touch the NMI watchdog inside a GTT pass

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 4 07:14:34 UTC 2018


We want to do a complete pass before checking the timeout, but just in
case the pass is quite slow, touch the NMI watchdog to prevent a
false positive.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index a7956ecc3e1f..b5807e61aa60 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -23,6 +23,7 @@
  */
 
 #include <linux/list_sort.h>
+#include <linux/nmi.h>
 #include <linux/prime_numbers.h>
 
 #include "../i915_selftest.h"
@@ -688,6 +689,13 @@ static int pot_hole(struct drm_i915_private *i915,
 			i915_vma_unpin(vma);
 			err = i915_vma_unbind(vma);
 			GEM_BUG_ON(err);
+
+			/*
+			 * Do a complete pass before timing out, but just
+			 * in case we are running too slow, ping the NMI
+			 * watchdog.
+			 */
+			touch_nmi_watchdog();
 		}
 
 		if (igt_timeout(end_time,
-- 
2.18.0



More information about the Intel-gfx-trybot mailing list