[Intel-gfx] [PATCH 14/19] drm/i915: Move context initialisation to first-use

2016-04-21 Thread Chris Wilson
Instead of allocating a new request when allocating a context, use the request that initiated the allocation to emit the context initialisation. This serves two purposes, it makes the initialisation atomic with first use (simplifying scheduling and our own error handling). Secondly, it enables us t

[Intel-gfx] [PATCH 14/19] drm/i915: Move context initialisation to first-use

2016-04-21 Thread Chris Wilson
Instead of allocating a new request when allocating a context, use the request that initiated the allocation to emit the context initialisation. This serves two purposes, it makes the initialisation atomic with first use (simplifying scheduling and our own error handling). Secondly, it enables us t

Re: [Intel-gfx] [PATCH 14/19] drm/i915: Move context initialisation to first-use

2016-04-21 Thread Joonas Lahtinen
On to, 2016-04-21 at 08:56 +0100, Chris Wilson wrote: > On Thu, Apr 21, 2016 at 10:47:30AM +0300, Joonas Lahtinen wrote: > > > > On to, 2016-04-21 at 08:08 +0100, Chris Wilson wrote: > > > > > > On Thu, Apr 21, 2016 at 09:57:03AM +0300, Joonas Lahtinen wrote: > > > > > > > > > > > > On ke, 2016

Re: [Intel-gfx] [PATCH 14/19] drm/i915: Move context initialisation to first-use

2016-04-21 Thread Chris Wilson
On Thu, Apr 21, 2016 at 10:47:30AM +0300, Joonas Lahtinen wrote: > On to, 2016-04-21 at 08:08 +0100, Chris Wilson wrote: > > 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

Re: [Intel-gfx] [PATCH 14/19] drm/i915: Move context initialisation to first-use

2016-04-21 Thread Joonas Lahtinen
On to, 2016-04-21 at 08:08 +0100, Chris Wilson wrote: > 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(requ

Re: [Intel-gfx] [PATCH 14/19] drm/i915: Move context initialisation to first-use

2016-04-21 Thread Chris Wilson
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_cont

Re: [Intel-gfx] [PATCH 14/19] drm/i915: Move context initialisation to first-use

2016-04-20 Thread Joonas Lahtinen
On ke, 2016-04-20 at 19:42 +0100, Chris Wilson wrote: > Instead of allocating a new request when allocating a context, use the > request that initiated the allocation to emit the context > initialisation. This serves two purposes, it makes the initialisation > atomic with first use (simplifying sch

[Intel-gfx] [PATCH 14/19] drm/i915: Move context initialisation to first-use

2016-04-20 Thread Chris Wilson
Instead of allocating a new request when allocating a context, use the request that initiated the allocation to emit the context initialisation. This serves two purposes, it makes the initialisation atomic with first use (simplifying scheduling and our own error handling). Secondly, it enables us t