Commit 21813d63 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin Committed by Andi Shyti

drm/i915/selftests: Flush all tiles on test exit

We want to idle all tiles when exiting selftests.

Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230125100003.18243-1-nirmoy.das@intel.com
parent 9635adf8
...@@ -14,21 +14,27 @@ ...@@ -14,21 +14,27 @@
int igt_flush_test(struct drm_i915_private *i915) int igt_flush_test(struct drm_i915_private *i915)
{ {
struct intel_gt *gt = to_gt(i915); struct intel_gt *gt;
int ret = intel_gt_is_wedged(gt) ? -EIO : 0; unsigned int i;
int ret = 0;
cond_resched(); for_each_gt(gt, i915, i) {
if (intel_gt_is_wedged(gt))
ret = -EIO;
if (intel_gt_wait_for_idle(gt, HZ * 3) == -ETIME) { cond_resched();
pr_err("%pS timed out, cancelling all further testing.\n",
__builtin_return_address(0));
GEM_TRACE("%pS timed out.\n", if (intel_gt_wait_for_idle(gt, HZ * 3) == -ETIME) {
__builtin_return_address(0)); pr_err("%pS timed out, cancelling all further testing.\n",
GEM_TRACE_DUMP(); __builtin_return_address(0));
intel_gt_set_wedged(gt); GEM_TRACE("%pS timed out.\n",
ret = -EIO; __builtin_return_address(0));
GEM_TRACE_DUMP();
intel_gt_set_wedged(gt);
ret = -EIO;
}
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment