]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "drm/i915/gt: Wait for new requests in intel_gt_retire_requests()"
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Nov 2019 07:10:40 +0000 (07:10 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Nov 2019 07:59:30 +0000 (07:59 +0000)
commitbd4eb311e923d30f507564dfd19cc5409316c2d1
treef8643ff045f4043073a050f4d65654caf8d7800b
parent2b9aee4e85341fe00c16a4105f04f749cd553693
Revert "drm/i915/gt: Wait for new requests in intel_gt_retire_requests()"

From inside an active timeline in the execbuf ioctl, we may try to
reclaim some space in the GGTT. We need GGTT space for all objects on
!full-ppgtt platforms, and for context images everywhere. However, to
free up space in the GGTT we may need to remove some pinned objects
(e.g. context images) that require flushing the idle barriers to remove.
For this we use the big hammer of intel_gt_wait_for_idle()

However, commit ae7a507b4b61 ("drm/i915/gt: Wait for new requests in
intel_gt_retire_requests()") will continue spinning on the wait if a
timeline is active but lacks requests, as is the case during execbuf
reservation. Spinning forever is quite time consuming, so revert that
commit and start again.

In practice, the effect commit ae7a507b4b61 was trying to achieve is
accomplished by commit 3f8d9c3c7da7 ("drm/i915/gt: Move new timelines
to the end of active_list"), so there is no immediate rush to replace
the looping.

Testcase: igt/gem_exec_reloc/basic-range
Fixes: ae7a507b4b61 ("drm/i915/gt: Wait for new requests in intel_gt_retire_requests()")
References: 3f8d9c3c7da7 ("drm/i915/gt: Move new timelines to the end of active_list")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191121071044.97798-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_gt_requests.c