Re: [Intel-gfx] [PATCH v2 06/11] drm/i915: Move pinning of dev_priv->kernel_context into its creator

2016-05-25 Thread Joonas Lahtinen
On ma, 2016-05-23 at 12:34 +0100, Chris Wilson wrote: > Rather than have every context ask "am I owned by the kernel? pin!", > move that logic into the creator of the kernel context, in order to > improve code comprehension. > > v2: Throw away the user_handle on failure to allocate the ppgtt. > >

Re: [Intel-gfx] [PATCH v2 06/11] drm/i915: Move pinning of dev_priv->kernel_context into its creator

2016-05-23 Thread Tvrtko Ursulin
On 23/05/16 13:16, Chris Wilson wrote: On Mon, May 23, 2016 at 01:09:02PM +0100, Tvrtko Ursulin wrote: @@ -426,6 +401,26 @@ int i915_gem_context_init(struct drm_device *dev) return PTR_ERR(ctx); } + if (ctx->legacy_hw_ctx.rcs_state) { + int ret; + +

Re: [Intel-gfx] [PATCH v2 06/11] drm/i915: Move pinning of dev_priv->kernel_context into its creator

2016-05-23 Thread Chris Wilson
On Mon, May 23, 2016 at 01:09:02PM +0100, Tvrtko Ursulin wrote: > >@@ -426,6 +401,26 @@ int i915_gem_context_init(struct drm_device *dev) > > return PTR_ERR(ctx); > > } > > > >+if (ctx->legacy_hw_ctx.rcs_state) { > >+int ret; > >+ > >+/* We may need to do

Re: [Intel-gfx] [PATCH v2 06/11] drm/i915: Move pinning of dev_priv->kernel_context into its creator

2016-05-23 Thread Tvrtko Ursulin
On 23/05/16 12:34, Chris Wilson wrote: Rather than have every context ask "am I owned by the kernel? pin!", move that logic into the creator of the kernel context, in order to improve code comprehension. v2: Throw away the user_handle on failure to allocate the ppgtt. Signed-off-by: Chris Wils

[Intel-gfx] [PATCH v2 06/11] drm/i915: Move pinning of dev_priv->kernel_context into its creator

2016-05-23 Thread Chris Wilson
Rather than have every context ask "am I owned by the kernel? pin!", move that logic into the creator of the kernel context, in order to improve code comprehension. v2: Throw away the user_handle on failure to allocate the ppgtt. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtine