Commit feef2a7c authored by Daniele Ceraolo Spurio's avatar Daniele Ceraolo Spurio Committed by Chris Wilson

drm/i915: re-use computed offset bias for context pin

The context has to obey the same offset requirements as the ring,
so we can re-use the same bias value we computed for the ring instead of
unconditionally using GUC_WOPCM_TOP.
Suggested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1482537382-28584-2-git-send-email-daniele.ceraolospurio@intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent d3ef1af6
...@@ -782,7 +782,9 @@ static int execlists_context_pin(struct intel_engine_cs *engine, ...@@ -782,7 +782,9 @@ static int execlists_context_pin(struct intel_engine_cs *engine,
goto err; goto err;
} }
flags = PIN_OFFSET_BIAS | GUC_WOPCM_TOP | PIN_GLOBAL; flags = PIN_GLOBAL;
if (ctx->ggtt_offset_bias)
flags |= PIN_OFFSET_BIAS | ctx->ggtt_offset_bias;
if (ctx == ctx->i915->kernel_context) if (ctx == ctx->i915->kernel_context)
flags |= PIN_HIGH; flags |= PIN_HIGH;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment