All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 06/27] drm/i915: Mimic skl with WaForceEnableNonCoherent
Date: Tue,  7 Jun 2016 17:18:58 +0300	[thread overview]
Message-ID: <1465309159-30531-7-git-send-email-mika.kuoppala@intel.com> (raw)
In-Reply-To: <1465309159-30531-1-git-send-email-mika.kuoppala@intel.com>

Past evidence with system hangs and hsds tie
WaForceEnableNonCoherent and WaDisableHDCInvalidation to
WaForceContextSaveRestoreNonCoherent. Documentation
states that WaForceContextSaveRestoreNonCoherent would
not be needed on skl past E0 but evidence proved otherwise. See
commit <510650e8b2ab> ("drm/i915/skl: Fix spurious gpu hang with gt3/gt4
revs"). In this scope consider kbl to be skl with a bigger revision than
E0 so play it safe and bind these two workarounds to the
WaForceContextSaveRestoreNonCoherent, and apply to all gen9.

v2: fix comment (Matthew)

References: HSD#2134449, HSD#2131413
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 37 +++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 7954fe0478b9..228c3f75d3c5 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -972,6 +972,27 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)
 			  HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT |
 			  HDC_FORCE_CSR_NON_COHERENT_OVR_DISABLE);
 
+	/* WaForceEnableNonCoherent and WaDisableHDCInvalidation are
+	 * both tied to WaForceContextSaveRestoreNonCoherent
+	 * in some hsds for skl. We keep the tie for all gen9. The
+	 * documentation is a bit hazy and so we want to get common behaviour,
+	 * even though there is no clear evidence we would need both on kbl/bxt.
+	 * This area has been source of system hangs so we play it safe
+	 * and mimic the skl regardless of what bspec says.
+	 *
+	 * Use Force Non-Coherent whenever executing a 3D context. This
+	 * is a workaround for a possible hang in the unlikely event
+	 * a TLB invalidation occurs during a PSD flush.
+	 */
+
+	/* WaForceEnableNonCoherent:skl,bxt,kbl */
+	WA_SET_BIT_MASKED(HDC_CHICKEN0,
+			  HDC_FORCE_NON_COHERENT);
+
+	/* WaDisableHDCInvalidation:skl,bxt,kbl */
+	I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) |
+		   BDW_DISABLE_HDC_INVALIDATION);
+
 	/* WaDisableSamplerPowerBypassForSOPingPong:skl,bxt,kbl */
 	if (IS_SKYLAKE(dev_priv) ||
 	    IS_KABYLAKE(dev_priv) ||
@@ -1089,22 +1110,6 @@ static int skl_init_workarounds(struct intel_engine_cs *engine)
 		WA_SET_BIT_MASKED(HIZ_CHICKEN,
 				  BDW_HIZ_POWER_COMPILER_CLOCK_GATING_DISABLE);
 
-	/* This is tied to WaForceContextSaveRestoreNonCoherent */
-	if (IS_SKL_REVID(dev_priv, 0, REVID_FOREVER)) {
-		/*
-		 *Use Force Non-Coherent whenever executing a 3D context. This
-		 * is a workaround for a possible hang in the unlikely event
-		 * a TLB invalidation occurs during a PSD flush.
-		 */
-		/* WaForceEnableNonCoherent:skl */
-		WA_SET_BIT_MASKED(HDC_CHICKEN0,
-				  HDC_FORCE_NON_COHERENT);
-
-		/* WaDisableHDCInvalidation:skl */
-		I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) |
-			   BDW_DISABLE_HDC_INVALIDATION);
-	}
-
 	/* WaBarrierPerformanceFixDisable:skl */
 	if (IS_SKL_REVID(dev_priv, SKL_REVID_C0, SKL_REVID_D0))
 		WA_SET_BIT_MASKED(HDC_CHICKEN0,
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-06-07 14:22 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 14:18 [PATCH 00/27] gen9 workarounds v3 Mika Kuoppala
2016-06-07 14:18 ` [PATCH 01/27] drm/i915/skl: Add WaDisableGafsUnitClkGating Mika Kuoppala
2016-06-07 14:18 ` [PATCH 02/27] drm/i915/kbl: Init gen9 workarounds Mika Kuoppala
2016-06-07 14:18 ` [PATCH 03/27] drm/i915/kbl: Add REVID macro Mika Kuoppala
2016-06-07 14:18 ` [PATCH 04/27] drm/i915/kbl: Add WaSkipStolenMemoryFirstPage for A0 Mika Kuoppala
2016-06-07 14:18 ` [PATCH 05/27] drm/i915/gen9: Always apply WaForceContextSaveRestoreNonCoherent Mika Kuoppala
2016-06-07 14:18 ` Mika Kuoppala [this message]
2016-06-07 14:18 ` [PATCH 07/27] drm/i915/kbl: Add WaEnableGapsTsvCreditFix Mika Kuoppala
2016-06-07 14:19 ` [PATCH 08/27] drm/i915/kbl: Add WaDisableFenceDestinationToSLM for A0 Mika Kuoppala
2016-06-07 14:19 ` [PATCH 09/27] drm/i915/kbl: Add WaDisableSDEUnitClockGating Mika Kuoppala
2016-06-07 14:19 ` [PATCH 10/27] drm/i915/edp: Add WaKVMNotificationOnConfigChange:bdw Mika Kuoppala
2016-06-07 14:19 ` [PATCH 11/27] drm/i915/kbl: Add WaDisableLSQCROPERFforOCL Mika Kuoppala
2016-06-07 14:19 ` [PATCH 12/27] drm/i915/gen9: Enable must set chicken bits in config0 reg Mika Kuoppala
2016-06-07 14:19 ` [PATCH 13/27] drm/i915/kbl: Add WaDisableGamClockGating Mika Kuoppala
2016-06-07 14:19 ` [PATCH 14/27] drm/i915/kbl: Add WaDisableDynamicCreditSharing Mika Kuoppala
2016-06-07 14:19 ` [PATCH 15/27] drm/i915: Add WaInsertDummyPushConstP for bxt and kbl Mika Kuoppala
2016-06-07 14:19 ` [PATCH 16/27] drm/i915/gen9: Add WaDisableSkipCaching Mika Kuoppala
2016-06-07 14:19 ` [PATCH 17/27] drm/i915/skl: Add WAC6entrylatency Mika Kuoppala
2016-06-07 14:19 ` [PATCH 18/27] drm/i915/kbl: Add WaForGAMHang Mika Kuoppala
2016-06-07 14:19 ` [PATCH 19/27] drm/i915/kbl: Add WaDisableGafsUnitClkGating Mika Kuoppala
2016-06-07 14:19 ` [PATCH 20/27] drm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharing Mika Kuoppala
2016-06-07 14:19 ` [PATCH 21/27] drm/i915/gen9: Add WaEnableChickenDCPR Mika Kuoppala
2016-06-07 14:19 ` [PATCH 22/27] drm/i915/skl: Extend WaDisableChickenBitTSGBarrierAckForFFSliceCS Mika Kuoppala
2016-06-07 14:19 ` [PATCH 23/27] drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch Mika Kuoppala
2016-06-07 14:19 ` [PATCH 24/27] drm/i915/gen9: Add WaFbcTurnOffFbcWatermark Mika Kuoppala
2016-06-07 14:19 ` [PATCH 25/27] drm/i915/gen9: Add WaFbcWakeMemOn Mika Kuoppala
2016-06-07 14:19 ` [PATCH 26/27] drm/i195/fbc: Add WaFbcNukeOnHostModify Mika Kuoppala
2016-06-07 14:19 ` [PATCH 27/27] drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance Mika Kuoppala
2016-06-07 16:04   ` Ville Syrjälä
2016-06-08 14:29     ` Mika Kuoppala
2016-06-07 14:52 ` ✓ Ro.CI.BAT: success for gen9 workarounds v3 Patchwork
2016-06-08  0:06   ` Chris Wilson
2016-06-08 14:28     ` Mika Kuoppala
2016-06-08 14:56       ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465309159-30531-7-git-send-email-mika.kuoppala@intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.