drm/i915/gt: Wait longer for tasks in migrate selftest
authorJonathan Cavitt <jonathan.cavitt@intel.com>
Mon, 28 Aug 2023 19:28:52 +0000 (12:28 -0700)
committerAndi Shyti <andi.shyti@linux.intel.com>
Thu, 31 Aug 2023 16:58:01 +0000 (18:58 +0200)
commitfb4e4c5e38583a2c6526ce9fb81ddc1f0831087c
tree2d73e93b717fa123c83f1ed67cef723669e15890
parent280410677af763f3871b93e794a199cfcf6fb580
drm/i915/gt: Wait longer for tasks in migrate selftest

The thread_global_copy subtest of the live migrate selftest creates a
large number of threads and waits 10ms for them all to start.  This is
not enough time to wait for the threaded tasks to start, as some may
need to wait for additional ring space to be granted.  Threads that do
so are at risk of getting stopped (signaled) in the middle of waiting
for additional space, which can result in ERESTARTSYS getting reported
erroneously by i915_request_wait.

Instead of waiting a flat 10ms for the threads to start, wait 10ms per
thread.  This grants enough of a buffer for each thread to wait for
additional ring space when needed.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@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/20230828192852.2894671-2-jonathan.cavitt@intel.com
drivers/gpu/drm/i915/gt/selftest_migrate.c