[Intel-gfx] [CI 6/6] drm/i915/gem: Drop lru bumping on display unpinning

Dave Airlie airlied at gmail.com
Mon Feb 8 20:09:48 UTC 2021


On Wed, 20 Jan 2021 at 07:43, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>
> Simplify the frontbuffer unpin by removing the lock requirement. The LRU
> bumping was primarily to protect the GTT from being evicted and from
> frontbuffers being eagerly shrunk. Now we protect frontbuffers from the
> shrinker, and we avoid accidentally evicting from the GTT, so the
> benefit from bumping LRU is no more, and we can save more time by not.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Reviewed-by: Matthew Auld <matthew.auld at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c |  7 +--
>  drivers/gpu/drm/i915/display/intel_overlay.c |  4 +-
>  drivers/gpu/drm/i915/gem/i915_gem_domain.c   | 45 --------------------
>  drivers/gpu/drm/i915/gem/i915_gem_object.h   |  1 -
>  4 files changed, 4 insertions(+), 53 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 32ff9d201aeb..2bd04e631eaa 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -1430,7 +1430,7 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
>                  */
>                 ret = i915_vma_pin_fence(vma);
>                 if (ret != 0 && INTEL_GEN(dev_priv) < 4) {
> -                       i915_gem_object_unpin_from_display_plane(vma);
> +                       i915_vma_unpin(vma);
>                         vma = ERR_PTR(ret);
>                         goto err;
>                 }
> @@ -1448,12 +1448,9 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
>
>  void intel_unpin_fb_vma(struct i915_vma *vma, unsigned long flags)
>  {
> -       i915_gem_object_lock(vma->obj, NULL);
>         if (flags & PLANE_HAS_FENCE)
>                 i915_vma_unpin_fence(vma);
> -       i915_gem_object_unpin_from_display_plane(vma);
> -       i915_gem_object_unlock(vma->obj);
> -

Why does this drop the locking here without explanation and without
reviewer comments?

Any patches from Chris that touch locking need vastly more review than
rubberstamps.

Dave.


More information about the Intel-gfx mailing list