Skip to content

Commit ad4062d

Browse files
committed
drm/i915: Wait for a moment before forcibly resetting the device
During igt, we ask to reset the device if any requests are still outstanding at the end of a test, as this quickly kills off any erroneous hanging request streams that may escape a test. However, since it may take the device a few milliseconds to flush itself after the end of a normal test, *cough* guc *cough*, we may accidentally tell the device to reset itself after it idles. If we wait a moment, our usual I915_IDLE_ENGINES_TIMEOUT of 200ms (seems a bit high, but still better than umpteen hangchecks!), we can differentiate better between a stuck engine and a healthy one, and so avoid prematurely forcing the reset and any extra complications that may entail. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190128010245.20148-1-chris@chris-wilson.co.uk
1 parent c562746 commit ad4062d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4050,7 +4050,8 @@ i915_drop_caches_set(void *data, u64 val)
40504050
val, val & DROP_ALL);
40514051
wakeref = intel_runtime_pm_get(i915);
40524052

4053-
if (val & DROP_RESET_ACTIVE && !intel_engines_are_idle(i915))
4053+
if (val & DROP_RESET_ACTIVE &&
4054+
wait_for(intel_engines_are_idle(i915), I915_IDLE_ENGINES_TIMEOUT))
40544055
i915_gem_set_wedged(i915);
40554056

40564057
/* No need to check and wait for gpu resets, only libdrm auto-restarts

0 commit comments

Comments
 (0)