aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2016-06-07 10:18:58 -0400
committerMika Kuoppala <mika.kuoppala@intel.com>2016-07-15 08:51:23 -0400
commit60f452e6147bcbe7d38cd2368cf5c7c1c27a4d38 (patch)
tree3e3f5ff99b4558a022579030bf1016cf2b00a7cb
parent6fd72492b382cb59beee97c7d5767f6e260620bd (diff)
drm/i915: Mimic skl with WaForceEnableNonCoherent
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> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-7-git-send-email-mika.kuoppala@intel.com (cherry picked from commit bbaefe72a00c93c6ec12e029019681e3f7d7de7a) Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index e6fa1e6bf7b7..5c7f3cff50cc 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -977,6 +977,27 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)
977 HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | 977 HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT |
978 HDC_FORCE_CSR_NON_COHERENT_OVR_DISABLE); 978 HDC_FORCE_CSR_NON_COHERENT_OVR_DISABLE);
979 979
980 /* WaForceEnableNonCoherent and WaDisableHDCInvalidation are
981 * both tied to WaForceContextSaveRestoreNonCoherent
982 * in some hsds for skl. We keep the tie for all gen9. The
983 * documentation is a bit hazy and so we want to get common behaviour,
984 * even though there is no clear evidence we would need both on kbl/bxt.
985 * This area has been source of system hangs so we play it safe
986 * and mimic the skl regardless of what bspec says.
987 *
988 * Use Force Non-Coherent whenever executing a 3D context. This
989 * is a workaround for a possible hang in the unlikely event
990 * a TLB invalidation occurs during a PSD flush.
991 */
992
993 /* WaForceEnableNonCoherent:skl,bxt,kbl */
994 WA_SET_BIT_MASKED(HDC_CHICKEN0,
995 HDC_FORCE_NON_COHERENT);
996
997 /* WaDisableHDCInvalidation:skl,bxt,kbl */
998 I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) |
999 BDW_DISABLE_HDC_INVALIDATION);
1000
980 /* WaDisableSamplerPowerBypassForSOPingPong:skl,bxt,kbl */ 1001 /* WaDisableSamplerPowerBypassForSOPingPong:skl,bxt,kbl */
981 if (IS_SKYLAKE(dev_priv) || 1002 if (IS_SKYLAKE(dev_priv) ||
982 IS_KABYLAKE(dev_priv) || 1003 IS_KABYLAKE(dev_priv) ||
@@ -1096,22 +1117,6 @@ static int skl_init_workarounds(struct intel_engine_cs *engine)
1096 WA_SET_BIT_MASKED(HIZ_CHICKEN, 1117 WA_SET_BIT_MASKED(HIZ_CHICKEN,
1097 BDW_HIZ_POWER_COMPILER_CLOCK_GATING_DISABLE); 1118 BDW_HIZ_POWER_COMPILER_CLOCK_GATING_DISABLE);
1098 1119
1099 /* This is tied to WaForceContextSaveRestoreNonCoherent */
1100 if (IS_SKL_REVID(dev, 0, REVID_FOREVER)) {
1101 /*
1102 *Use Force Non-Coherent whenever executing a 3D context. This
1103 * is a workaround for a possible hang in the unlikely event
1104 * a TLB invalidation occurs during a PSD flush.
1105 */
1106 /* WaForceEnableNonCoherent:skl */
1107 WA_SET_BIT_MASKED(HDC_CHICKEN0,
1108 HDC_FORCE_NON_COHERENT);
1109
1110 /* WaDisableHDCInvalidation:skl */
1111 I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) |
1112 BDW_DISABLE_HDC_INVALIDATION);
1113 }
1114
1115 /* WaBarrierPerformanceFixDisable:skl */ 1120 /* WaBarrierPerformanceFixDisable:skl */
1116 if (IS_SKL_REVID(dev, SKL_REVID_C0, SKL_REVID_D0)) 1121 if (IS_SKL_REVID(dev, SKL_REVID_C0, SKL_REVID_D0))
1117 WA_SET_BIT_MASKED(HDC_CHICKEN0, 1122 WA_SET_BIT_MASKED(HDC_CHICKEN0,