]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Protect used framebuffers from casual eviction
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 19 Jan 2021 21:43:35 +0000 (21:43 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 20 Jan 2021 21:05:12 +0000 (21:05 +0000)
commitef76579e0bc90d9fa01b14b5d7cf5a807e36d075
treee25ab27bb723cb209247bc8eb3abe9ba27bcadfc
parente707e5f9fc9a88b659030922277b1f6a6baa7ccc
drm/i915/gem: Protect used framebuffers from casual eviction

In the shrinker, we protect framebuffers from light reclaim as we
typically expect framebuffers to be reused in the near future (and with
low latency requirements). We can apply the same logic to the GGTT
eviction and defer framebuffers to the second pass only used if the
caller is desperate enough to wait for space to become available.
In most cases, the caller will use a smaller partial vma instead of
trying to force the object into the GGTT if doing so will cause other
users to be evicted.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210119214336.1463-5-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/display/intel_frontbuffer.c
drivers/gpu/drm/i915/gem/i915_gem_domain.c
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/i915_vma.h
drivers/gpu/drm/i915/i915_vma_types.h