mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
21813d631d
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
42 lines
734 B
C
42 lines
734 B
C
/*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2018 Intel Corporation
|
|
*/
|
|
|
|
#include "gt/intel_gt.h"
|
|
#include "gt/intel_gt_requests.h"
|
|
|
|
#include "i915_drv.h"
|
|
#include "i915_selftest.h"
|
|
|
|
#include "igt_flush_test.h"
|
|
|
|
int igt_flush_test(struct drm_i915_private *i915)
|
|
{
|
|
struct intel_gt *gt;
|
|
unsigned int i;
|
|
int ret = 0;
|
|
|
|
for_each_gt(gt, i915, i) {
|
|
if (intel_gt_is_wedged(gt))
|
|
ret = -EIO;
|
|
|
|
cond_resched();
|
|
|
|
if (intel_gt_wait_for_idle(gt, HZ * 3) == -ETIME) {
|
|
pr_err("%pS timed out, cancelling all further testing.\n",
|
|
__builtin_return_address(0));
|
|
|
|
GEM_TRACE("%pS timed out.\n",
|
|
__builtin_return_address(0));
|
|
GEM_TRACE_DUMP();
|
|
|
|
intel_gt_set_wedged(gt);
|
|
ret = -EIO;
|
|
}
|
|
}
|
|
|
|
return ret;
|
|
}
|