On Thu, Apr 21, 2016 at 09:57:03AM +0300, Joonas Lahtinen wrote:
> On ke, 2016-04-20 at 19:42 +0100, Chris Wilson wrote:
> > +   if (!request->ctx->engine[engine->id].initialised) {
> > +           ret = engine->init_context(request);
> > +           if (ret) {
> > +                   intel_lr_context_unpin(request->ctx, engine);
> 
> I prefer the goto teardown path, it's easy to read and modify later on.

Ah, that would lead to bugs here. After we emit init_context on this
request, the request must run to completion as the request itself tracks
modification to global data, e.g. the ctx->initialised flag here and the
golden render state object's liveness tracking.

Well that deserves a comment!
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to