]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Wait for new requests in intel_gt_retire_requests()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Nov 2019 22:57:32 +0000 (22:57 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Nov 2019 13:00:15 +0000 (13:00 +0000)
commitae7a507b4b61ab32a7e12bc2e0e43b752549a7e8
tree5f9b1181a5feba1e7431e0e3151c4b510f374393
parenteb4dfd3540a54db4be2adbf739351b93278da9f8
drm/i915/gt: Wait for new requests in intel_gt_retire_requests()

Our callers fall into two categories, those passing timeout=0 who just
want to flush request retirements and those passing a timeout that need
to wait for submission completion (e.g. intel_gt_wait_for_idle()).
Currently, we only wait for a snapshot of timelines at the start of the
wait (but there was an expectation that new requests would cause timelines
to appear at the end). However, our callers, such as
intel_gt_wait_for_idle() before suspend, do require us to wait for the
power management requests emitted by retirement as well. If we don't,
then it takes an extra second or two for the background worker to flush
the queue and mark the GT as idle.

Fixes: 7c9bd5d5e8ff ("drm/i915: Drop struct_mutex from around i915_retire_requests()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191114225736.616885-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_gt_requests.c