Re: [PATCH v3 29/33] drm/i915: Split idling from forcing context switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux