[Intel-gfx] [PATCH 02/10] drm/i915/userptr: Make gup errors stickier

Chris Wilson chris at chris-wilson.co.uk
Mon Aug 15 15:28:39 UTC 2016


On Mon, Aug 15, 2016 at 06:08:21PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> 
> > +	if (obj->userptr.work) {
> >  		/* active flag should still be held for the pending work */
> > -		return -EAGAIN;
> > +		if (IS_ERR(obj->userptr.work))
> > +			return PTR_ERR(obj->userptr.work);
> 
> Previously you did set the work to null before returning error,
> now you dont.
> 
> Is it the responsibility of cancel_userptr now, through mm notifier,
> that clears the pointer?

Yes. 

> > Keep any error reported by the gup_worker until we are notified that the
> > arena has changed (via the mmu-notifier). This has the importance of
> > making two consecutive calls to i915_gem_object_get_pages() reporting
> > the same error, and curtailing a loop of detecting a fault and requeueing
> > a gup_worker.

-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list