From: Michel Thierry Subject: [PATCH 4/8] drm/i915: Add WaFlushCoherentL3CacheLinesAtContextSwitch:bdw Date: Tue, 15 Jul 2014 13:25:31 +0100 Message-ID: <1405427135-11377-5-git-send-email-michel.thierry@intel.com> References: <1405427135-11377-1-git-send-email-michel.thierry@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 8DD2A6E58F for ; Tue, 15 Jul 2014 05:25:36 -0700 (PDT) In-Reply-To: <1405427135-11377-1-git-send-email-michel.thierry@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Coherent L3 cache lines are not getting flushed during context switch which is causing issues. Signed-off-by: Michel Thierry --- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 44e7f34..aaadf4a 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -4708,6 +4708,9 @@ enum punit_power_well { #define GEN8_L3SQCREG1 0xb100 #define GEN8_L3SQCREG1_DEFAULT_VALUE 0x784000 +#define GEN8_L3SQCREG4 0xb118 +#define GEN8_PIPELINE_FLUSH_COHERENT_LINES (1<<21) + /* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030 #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 6815680..8bde0aa 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5490,6 +5490,10 @@ static void gen8_init_clock_gating(struct drm_device *dev) /* WaDisableFfDopClockGating:bdw */ I915_WRITE(GEN7_MISCCPCTL, I915_READ(GEN7_MISCCPCTL) & ~GEN8_DOP_CLOCK_GATE_CFCLK_ENABLE); + + /* WaFlushCoherentL3CacheLinesAtContextSwitch:bdw */ + I915_WRITE(GEN8_L3SQCREG4, I915_READ(GEN8_L3SQCREG4) | + GEN8_PIPELINE_FLUSH_COHERENT_LINES); } static void haswell_init_clock_gating(struct drm_device *dev) -- 1.9.0