On Fri, Jan 27, 2017 at 03:03:09PM +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.
> 
> v2: s/create/default, remove engine->ctx_desc_template
> 
> Cc: Chris Wilson <ch...@chris-wilson.co.uk>
> Signed-off-by: Mika Kuoppala <mika.kuopp...@intel.com>

> +#define GEN8_CTX_VALID (1<<0)
> +#define GEN8_CTX_FORCE_PD_RESTORE (1<<1)
> +#define GEN8_CTX_FORCE_RESTORE (1<<2)
> +#define GEN8_CTX_L3LLC_COHERENT (1<<5)
> +#define GEN8_CTX_PRIVILEGE (1<<8)
>  #define GEN8_CTX_ADDRESSING_MODE_SHIFT 3
>  #define GEN8_CTX_ADDRESSING_MODE(dev_priv) (USES_FULL_48BIT_PPGTT(dev_priv) 
> ?\
>                               INTEL_LEGACY_64B_CONTEXT : \
>                               INTEL_LEGACY_32B_CONTEXT)
>  
> +#define GEN8_CTX_ID_SHIFT 32
> +#define GEN8_CTX_ID_WIDTH 21

One thing to note for a future patch would be
BUILD_BUG_ON(GEN8_CTX_ID_WIDTH < ilog2(MAX_CONTEXT_HW_ID));
now that it is exposed to i915_gem_context.c

Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk>
-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