]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Harden the heartbeat against a stuck driver
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 2 Jul 2020 09:52:18 +0000 (10:52 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 2 Jul 2020 11:30:23 +0000 (12:30 +0100)
commit55e55b1dee4a1777cec6fe74f3e2c8feb65cf11b
treeb01604812aeb55e7673adff00c19eba441e897cc
parentcfd5b69cc2c01259f316b6100a6a6f96bc78c6f8
drm/i915/gt: Harden the heartbeat against a stuck driver

If the driver gets stuck holding the kernel timeline, we cannot issue a
heartbeat and so fail to discover that the driver is indeed stuck and do
not issue a GPU reset (which would hopefully unstick the driver!).
Switch to using a trylock so that we can query if the heartbeat's
timeline mutex is locked elsewhere, and then use the timer to probe if it
remains stuck at the same spot for consecutive heartbeats, indicating
that the mutex has not been released and the engine has not progressed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200702095219.963-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
drivers/gpu/drm/i915/gt/intel_engine_types.h