]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Prefer recycling an idle fence
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 23 Dec 2020 12:20:50 +0000 (12:20 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 23 Dec 2020 21:58:00 +0000 (21:58 +0000)
commitaeaa3fe364c6896c91a3dee006025dd02503d223
treeefdc7d646bfe753af5e78001c9330c4f797ef0f8
parent851da53d92f80a01f8be302ad6890c9dbf1b2ec7
drm/i915/gt: Prefer recycling an idle fence

If we want to reuse a fence that is in active use by the GPU, we have to
wait an uncertain amount of time, but if we reuse an inactive fence, we
can change it right away. Loop through the list of available fences
twice, ignoring any active fences on the first pass.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201223122051.4624-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c