summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_capture.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-10-08 14:11:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-10-08 14:14:52 +0100
commit9ce50ffed89a46fa1bc98ee2cfe2271c49801079 (patch)
treece910238b86eaf57fb39ef123605a746fef55d95 /tests/i915/gem_exec_capture.c
parenta15f8da169c7ab32db77aca7ae2b26c616c9edef (diff)
i915/gem_exec_capture: Set preempt-timeout to speed up hangcheck
We set a goal for hangcheck to remove the hung request, and this in part depends on hangcheck being able to make reasonable progress. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_exec_capture.c')
-rw-r--r--tests/i915/gem_exec_capture.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c
index 186bed7e..84efdd94 100644
--- a/tests/i915/gem_exec_capture.c
+++ b/tests/i915/gem_exec_capture.c
@@ -494,7 +494,7 @@ static void many(int fd, int dir, uint64_t size, unsigned int flags)
free(offsets);
}
-static void prioinv(int fd, int dir, unsigned ring)
+static void prioinv(int fd, int dir, unsigned ring, const char *name)
{
const uint32_t bbe = MI_BATCH_BUFFER_END;
struct drm_i915_gem_exec_object2 obj = {
@@ -514,6 +514,9 @@ static void prioinv(int fd, int dir, unsigned ring)
igt_require(igt_params_set(fd, "reset", "%u", -1)); /* engine resets! */
igt_require(gem_gpu_reset_type(fd) > 1);
+ /* Needs to be fast enough for the hangcheck to return within 1s */
+ gem_engine_property_printf(fd, name, "preempt_timeout_ms", "%d", 500);
+
gtt = gem_aperture_size(fd) / size;
ram = (intel_get_avail_ram_mb() << 20) / size;
igt_debug("Available objects in GTT:%"PRIu64", RAM:%"PRIu64"\n",
@@ -648,7 +651,7 @@ igt_main
}
test_each_engine("pi", fd, e)
- prioinv(fd, dir, e->flags);
+ prioinv(fd, dir, e->flags, e->name);
igt_fixture {
close(dir);