@@ -19,7 +19,8 @@ int igt_flush_test(struct drm_i915_private *i915, unsigned int flags)
i915_gem_set_wedged(i915);
}
- if (i915_gem_wait_for_idle(i915, flags, HZ / 5) == -ETIME) {
+ switch (i915_gem_wait_for_idle(i915, flags, HZ / 5)) {
+ case -ETIME:
pr_err("%pS timed out, cancelling all further testing.\n",
__builtin_return_address(0));
@@ -27,6 +28,12 @@ int igt_flush_test(struct drm_i915_private *i915, unsigned int flags)
GEM_TRACE_DUMP();
i915_gem_set_wedged(i915);
+ break;
+
+ case 0:
+ pr_err("%pS missed idle-completion interrupt\n",
+ __builtin_return_address(0));
+ break;
}
return i915_terminally_wedged(&i915->gpu_error) ? -EIO : 0;
On flushing the tests, we do so with a timeout to prevent waiting indefinitely. However, if we miss an interrupt, the timeout provides a safety net that still completes successfully (as we check the completion condition after reaching the timeout and see all is well). This safety net can unfortunately mask some bugs, so let's add a warning here so we don't just ignore it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> --- drivers/gpu/drm/i915/selftests/igt_flush_test.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)