[Beignet] [RFC PATCH 1/3] drm/i915: Create context desc template when context is created

Chris Wilson chris at chris-wilson.co.uk
Mon Jan 9 21:22:32 UTC 2017


On Mon, Jan 09, 2017 at 06:52:52PM +0200, Mika Kuoppala wrote:
> Move the invariant parts of context desc setup from execlist init
> to context creation. This is advantageous when we need to
> create different templates based on the context parametrization,
> ie. for svm capable contexts.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_context.c | 18 ++++++++++++++++--
>  drivers/gpu/drm/i915/i915_reg.h         | 15 +++++++++++++++
>  drivers/gpu/drm/i915/intel_lrc.c        | 21 +--------------------
>  3 files changed, 32 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index 40a6939..dadc845 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -257,6 +257,21 @@ static int assign_hw_id(struct drm_i915_private *dev_priv, unsigned *out)
>  	return 0;
>  }
>  
> +static u32 create_default_ctx_desc(const struct drm_i915_private *dev_priv)

I would refrain from using create. default_desc_template() will do
without suggesting that we create/alloc anything.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Beignet mailing list