[Intel-gfx] [PATCH 5/5] drm/i915: Replace i915_vma_put_fence()

Chris Wilson chris at chris-wilson.co.uk
Wed Aug 21 21:27:31 UTC 2019


Quoting Matthew Auld (2019-08-21 22:05:55)
> On Wed, 21 Aug 2019 at 16:59, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> >
> > Avoid calling i915_vma_put_fence() by using our alternate paths that
> > bind a secondary vma avoiding the original fenced vma. For the few
> > instances where we need to release the fence (i.e. on binding when the
> > GGTT range becomes invalid), replace the put_fence with a revoke_fence.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> <snip>
> 
> > @@ -557,20 +553,16 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_gem_object *obj,
> >                 wakeref = intel_runtime_pm_get(rpm);
> >         }
> >
> > -       vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0,
> > -                                      PIN_MAPPABLE |
> > -                                      PIN_NONBLOCK /* NOWARN */ |
> > -                                      PIN_NOEVICT);
> > +       vma = ERR_PTR(-ENODEV);
> > +       if (i915_gem_object_is_tiled(obj))
> > +               vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0,
> 
> Hmm?

Well spotted. Just shows how often we hit this path!
-Chris


More information about the Intel-gfx mailing list