|
@@ -279,7 +279,7 @@ intel_lr_context_descriptor_update(struct i915_gem_context *ctx,
|
|
BUILD_BUG_ON(MAX_CONTEXT_HW_ID > (1<<GEN8_CTX_ID_WIDTH));
|
|
BUILD_BUG_ON(MAX_CONTEXT_HW_ID > (1<<GEN8_CTX_ID_WIDTH));
|
|
|
|
|
|
desc = ctx->desc_template; /* bits 0-11 */
|
|
desc = ctx->desc_template; /* bits 0-11 */
|
|
- desc |= i915_ggtt_offset(ce->state) + LRC_PPHWSP_PN * PAGE_SIZE;
|
|
|
|
|
|
+ desc |= i915_ggtt_offset(ce->state) + LRC_HEADER_PAGES * PAGE_SIZE;
|
|
/* bits 12-31 */
|
|
/* bits 12-31 */
|
|
desc |= (u64)ctx->hw_id << GEN8_CTX_ID_SHIFT; /* bits 32-52 */
|
|
desc |= (u64)ctx->hw_id << GEN8_CTX_ID_SHIFT; /* bits 32-52 */
|
|
|
|
|
|
@@ -2048,8 +2048,11 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx,
|
|
|
|
|
|
context_size = round_up(engine->context_size, I915_GTT_PAGE_SIZE);
|
|
context_size = round_up(engine->context_size, I915_GTT_PAGE_SIZE);
|
|
|
|
|
|
- /* One extra page as the sharing data between driver and GuC */
|
|
|
|
- context_size += PAGE_SIZE * LRC_PPHWSP_PN;
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Before the actual start of the context image, we insert a few pages
|
|
|
|
+ * for our own use and for sharing with the GuC.
|
|
|
|
+ */
|
|
|
|
+ context_size += LRC_HEADER_PAGES * PAGE_SIZE;
|
|
|
|
|
|
ctx_obj = i915_gem_object_create(ctx->i915, context_size);
|
|
ctx_obj = i915_gem_object_create(ctx->i915, context_size);
|
|
if (IS_ERR(ctx_obj)) {
|
|
if (IS_ERR(ctx_obj)) {
|