From: Daniele Ceraolo Spurio Date: Fri, 23 Dec 2016 23:56:22 +0000 (-0800) Subject: drm/i915: re-use computed offset bias for context pin X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=feef2a7cb93e532bde3c7682ec7b1bce99cc8be5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1482537382-28584-2-git-send-email-daniele.ceraolospurio@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson --- diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index cec9037baf65..fc64be1bdea7 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -782,7 +782,9 @@ static int execlists_context_pin(struct intel_engine_cs *engine, 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) flags |= PIN_HIGH;