[Intel-gfx] [PATCH v3 29/33] drm/i915: Split idling from forcing context switch
Chris Wilson
chris at chris-wilson.co.uk
Wed Jun 8 10:56:23 UTC 2016
On Wed, Jun 08, 2016 at 12:02:28PM +0300, Joonas Lahtinen wrote:
> On pe, 2016-06-03 at 15:37 +0100, Chris Wilson wrote:
> > @@ -261,11 +298,17 @@ int i915_gem_evict_vm(struct i915_address_space *vm, bool do_idle)
> > trace_i915_gem_evict_vm(vm);
> >
> > if (do_idle) {
> > - ret = i915_gpu_idle(vm->dev);
> > + struct drm_i915_private *dev_priv = to_i915(vm->dev);
> > +
> > + ret = switch_to_pinned_context(dev_priv);
> > + if (ret)
> > + return ret;
> > +
> > + ret = i915_gem_wait_for_idle(dev_priv);
> > if (ret)
> > return ret;
> >
> > - i915_gem_retire_requests(to_i915(vm->dev));
> > + i915_gem_retire_requests(dev_priv);
>
> This and previous hunk, my eyes see a need for a new function (with an
> appropriate name, hopefully).
We'll get to the point where the duplication no longer exists.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list