]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Refine occupancy test in kill_context()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 31 Oct 2019 09:01:04 +0000 (09:01 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 1 Nov 2019 09:44:48 +0000 (09:44 +0000)
commitb41a079775030c050ba9db11cc41e7f4a99ef4ec
treecc2788285ac7ab1053c9d8b55e5a25fa6e4e85f1
parent8fcf575cd0a3c2ac97f3a6eb7d57b7ec6916d8eb
drm/i915/gem: Refine occupancy test in kill_context()

Don't just look at the very last request in a queue when deciding if we
need to evict the context from the GPU, as that request may still be in
the submission queue while the rest of the context is running!

Instead, walk back along the queued requests looking for the active
request and checking that.

Fixes: bd383a271d0d ("drm/i915/gem: Cancel contexts when hangchecking is disabled")
Testcase: igt/gem_ctx_persistence/queued
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191031090104.22245-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c