Re: [PATCH 14/17] drm/i915: Nonblocking request submission

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

 



On Tue, Aug 30, 2016 at 11:35:14AM +0300, Joonas Lahtinen wrote:
> On su, 2016-08-28 at 21:46 +0100, Chris Wilson wrote:
> > @@ -442,6 +442,18 @@ i915_gem_request_alloc(struct intel_engine_cs *engine,
> >  	 */
> >  	req->head = req->ring->tail;
> >  
> > +	prev = i915_gem_active_peek(&engine->last_request,
> > +				    &req->i915->drm.struct_mutex);
> > +	if (prev) {
> > +		ret = i915_sw_fence_await_sw_fence(&req->submit,
> > +						   &prev->submit,
> > +						   GFP_KERNEL);
> > +		if (ret < 0) {
> > +			i915_add_request(req);
> 
> As discussed in IRC, this should not be necessary at all. We're still
> allocating the request, and the fence_await call failed (not setting up
> any dependencies to our request implied) so nobody should know of our
> request yet.

At this point in the request alloc, we are already exposed (by the setup
of the context), it's just if we do the await before we do the context
setup then we are ok to fail. The problem being unwinding the fence if
the context setup fails... Ugh, now I remember why I chose the
ordering...
-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