]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Cancel outstanding work after disabling heartbeats on an engine
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 28 Sep 2020 22:15:08 +0000 (23:15 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 30 Sep 2020 18:24:46 +0000 (14:24 -0400)
commit5d602b1eaa0685a70dad995254c4c92f889cb351
tree6fd3bd10e45780d60662fec29acf40bf114d5b11
parent576727f084e144a3398d8afd964360d9b47fd01a
drm/i915: Cancel outstanding work after disabling heartbeats on an engine

We only allow persistent requests to remain on the GPU past the closure
of their containing context (and process) so long as they are continuously
checked for hangs or allow other requests to preempt them, as we need to
ensure forward progress of the system. If we allow persistent contexts
to remain on the system after the the hangcheck mechanism is disabled,
the system may grind to a halt. On disabling the mechanism, we sent a
pulse along the engine to remove all executing contexts from the engine
which would check for hung contexts -- but we did not prevent those
contexts from being resubmitted if they survived the final hangcheck.

Fixes: 3b835a3227fd ("drm/i915/gt: Expose heartbeat interval via sysfs")
Testcase: igt/gem_ctx_persistence/heartbeat-stop
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: <stable@vger.kernel.org> # v5.7+
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200928221510.26044-1-chris@chris-wilson.co.uk
(cherry picked from commit 7a991cd3e3da9a56d5616b62d425db000a3242f2)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gt/intel_engine.h
drivers/gpu/drm/i915/i915_request.c