drm/i915/selftests: Wait for idle between idle resets as well
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Apr 2018 12:03:46 +0000 (13:03 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 26 Apr 2018 16:31:49 +0000 (17:31 +0100)
commit935dff1a218c2162aad8f0e681cbb5d601742412
treeaa109140a73411d8e83aa0003a4c63482b53889c
parenta49714531be37111b1540d85a70bb55d0958272c
drm/i915/selftests: Wait for idle between idle resets as well

Even though we weren't injecting guilty requests to be reset, we could
still fall over the issue of resetting the same request too fast -- where
the GPU refuses to start again. (Although it is interesting to note that
reloading the driver is sufficient, suggesting that we could recover if
we delayed the setup after reset?) Continue to paper over the problem by
adding a small delay by waiting for the engine to idle between tests,
and ensure that the engines are idle before starting the idle tests.

v2: Replace single instance of 50 with a magic macro.

References: 028666793a02 ("drm/i915/selftests: Avoid repeatedly harming the same innocent context")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180411120346.27618-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/intel_hangcheck.c