]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commitd7d82f5d5c04ed9cb68d3663ffde10898a2969be
treeefdc7d646bfe753af5e78001c9330c4f797ef0f8
parentf170523a7b8eb8443e895e3e804cf52726bfc367
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