]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Skip post-reset request emission if the engine is not idle
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 5 Feb 2018 15:24:31 +0000 (15:24 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 5 Feb 2018 15:27:26 +0000 (15:27 +0000)
commit8e46111df52e42eb48c362cf35343eed5809b127
tree645b9469a26642d6c81f121a7edea965dd05e00c
parent695ccce09175e30db6df3fba5c85064a60ed0431
drm/i915: Skip post-reset request emission if the engine is not idle

Since commit a778cdc10071 ("drm/i915: Restore the kernel context after a
GPU reset on an idle engine") we submit a request following the engine
reset. The intent is that we don't submit a request if the engine is
busy (as it will restart active by itself) but we only checked to see if
there were remaining requests in flight on the hardware and skipped
checking to see if there were any ready requests that would be
immediately submitted on restart (the same time as our new request would
be). Having convinced the engine to appear idle in the previous patch,
we can use intel_engine_is_idle() as a better test to only submit a new
request if there are no pending requests.

As it happens, this is tripping up igt/drv_selftest/live_hangcheck in CI
as we overfill the kernel_context ringbuffer trigger an infinite
recursion from within the reset.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104786
References: a778cdc10071 ("drm/i915: Restore the kernel context after a GPU reset on an idle engine")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180205152431.12163-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c