drm/i915/gt: Retire cancelled requests on unload
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 30 Sep 2020 16:32:53 +0000 (17:32 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 30 Sep 2020 16:59:26 +0000 (17:59 +0100)
commitb05734720de982a40676a14ddfdca5f87b4aab5e
tree3189e877764bcd1f3b981e5f32af60616450ae42
parenteb3afbe18eb193a6cbf6541b3876c3fe14ad2a51
drm/i915/gt: Retire cancelled requests on unload

If we manage to hit the intel_gt_set_wedged_on_fini() while active, i.e.
module unload during a stress test, we may cancel the requests but not
clean up. This leads to a very slow module unload as we wait for
something or other to trigger the retirement flushing, or timeout and
unload with a bunch of warnings. Instead if we explicitly cancel then
cleanup on an active unload, it should be instant and quiet.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200930163253.2789-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_reset.c