2 * SPDX-License-Identifier: MIT
4 * Copyright © 2018 Intel Corporation
7 #include "gt/intel_gt.h"
8 #include "gt/intel_gt_requests.h"
11 #include "i915_selftest.h"
13 #include "igt_flush_test.h"
15 int igt_flush_test(struct drm_i915_private
*i915
)
17 struct intel_gt
*gt
= &i915
->gt
;
18 int ret
= intel_gt_is_wedged(gt
) ? -EIO
: 0;
22 if (intel_gt_wait_for_idle(gt
, HZ
/ 5) == -ETIME
) {
23 pr_err("%pS timed out, cancelling all further testing.\n",
24 __builtin_return_address(0));
26 GEM_TRACE("%pS timed out.\n",
27 __builtin_return_address(0));
30 intel_gt_set_wedged(gt
);