[Intel-gfx] [PATCH] drm/i915: Create context desc template when context is created
Mika Kuoppala
mika.kuoppala at linux.intel.com
Mon Jan 30 14:48:27 UTC 2017
Chris Wilson <chris at chris-wilson.co.uk> writes:
> 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 <chris at chris-wilson.co.uk>
>> Signed-off-by: Mika Kuoppala <mika.kuoppala at 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 <chris at chris-wilson.co.uk>
Pushed, thanks for review.
-Mika
More information about the Intel-gfx
mailing list