summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/selftests
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2023-01-25 11:00:03 +0100
committerAndi Shyti <andi.shyti@linux.intel.com>2023-01-26 14:11:47 +0100
commit21813d631de33c92ae7754223658fce7bb74622f (patch)
treecb1708021937d6d71ef503b1f5e61cd19465cd82 /drivers/gpu/drm/i915/selftests
parentMerge drm/drm-next into drm-intel-gt-next (diff)
downloadlinux-21813d631de33c92ae7754223658fce7bb74622f.tar.xz
linux-21813d631de33c92ae7754223658fce7bb74622f.zip
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: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230125100003.18243-1-nirmoy.das@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r--drivers/gpu/drm/i915/selftests/igt_flush_test.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/selftests/igt_flush_test.c b/drivers/gpu/drm/i915/selftests/igt_flush_test.c
index b484e12df417..29110abb4fe0 100644
--- a/drivers/gpu/drm/i915/selftests/igt_flush_test.c
+++ b/drivers/gpu/drm/i915/selftests/igt_flush_test.c
@@ -14,21 +14,27 @@
int igt_flush_test(struct drm_i915_private *i915)
{
- struct intel_gt *gt = to_gt(i915);
- int ret = intel_gt_is_wedged(gt) ? -EIO : 0;
+ struct intel_gt *gt;
+ 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) {
- pr_err("%pS timed out, cancelling all further testing.\n",
- __builtin_return_address(0));
+ cond_resched();
- GEM_TRACE("%pS timed out.\n",
- __builtin_return_address(0));
- GEM_TRACE_DUMP();
+ if (intel_gt_wait_for_idle(gt, HZ * 3) == -ETIME) {
+ pr_err("%pS timed out, cancelling all further testing.\n",
+ __builtin_return_address(0));
- intel_gt_set_wedged(gt);
- ret = -EIO;
+ GEM_TRACE("%pS timed out.\n",
+ __builtin_return_address(0));
+ GEM_TRACE_DUMP();
+
+ intel_gt_set_wedged(gt);
+ ret = -EIO;
+ }
}
return ret;