On ti, 2016-08-30 at 09:43 +0100, Chris Wilson wrote: > 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... Hmm, true so, maybe drop a comment here? Regards, Joonas > -Chris > -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx