Skip to contentSkip to conversation

drm/i915/bxt: Enable existing gen9 harware workarounds for Broxton

PATCH In review Nick Hoath 3 participants 3 messages Apr 7, 2015 – Apr 29, 2015

Subsystems (2)
lore
Share & tools
lore

Nick Hoath

author
#0 lore raw

PATCH 1/1 drm/i915/bxt: Enable existing gen9 harware workarounds for Broxton

---
 drivers/gpu/drm/i915/i915_reg.h         |  8 +++++
 drivers/gpu/drm/i915/intel_pm.c         |  2 ++
 drivers/gpu/drm/i915/intel_ringbuffer.c | 53 +++++++++++++++++++--------------
 3 files changed, 41 insertions(+), 22 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +8 -0
index 7e1a0fd9..91eef06 100644
@@ -5339,6 +5339,7 @@ enum skl_disp_power_wells {
 
 #define GEN8_L3SQCREG4				0xb118
 #define  GEN8_LQSC_RO_PERF_DIS			(1<<27)
+#define  GEN8_PIPELINE_FLUSH_COHERENT_LINES	(1<<21)
 
 /* GEN8 chicken */
 #define HDC_CHICKEN0				0x7300
@@ -7324,4 +7325,11 @@ enum skl_disp_power_wells {
 #define _PALETTE_A (dev_priv->info.display_mmio_offset + 0xa000)
 #define _PALETTE_B (dev_priv->info.display_mmio_offset + 0xa800)
 
+/*
+ * Chicken Registers for LLC/eLLC Hot Spotting Avoidance Mode for
+ * 3D/Media Compressed Resources
+ */
+#define GEN9_CHICKEN_MISC1_REG				0x42080
+#define GEN9_CHICKEN_MISC1_NEW_HASH_ENABLE		(1<<15)
+
 #endif /* _I915_REG_H_ */
drivers/gpu/drm/i915/intel_pm.c +2 -0
index c3c473d..bbb5d64 100644
@@ -96,6 +96,8 @@ static void skl_init_clock_gating(struct drm_device *dev)
 
 static void bxt_init_clock_gating(struct drm_device *dev)
 {
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
 	gen9_init_clock_gating(dev);
 
 	/* WaVSRefCountFullforceMissDisable:bxt */
drivers/gpu/drm/i915/intel_ringbuffer.c +31 -22

89 lines not on this page · raw message

Signature · 6 lines
2.1.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#1 lore raw

Task id: 6138 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                                  276/276              276/276
ILK                                  302/302              302/302
SNB                                  313/313              313/313
IVB                                  337/337              337/337
BYT                                  286/286              286/286
HSW                                  395/395              395/395
BDW                                  321/321              321/321

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Nick Hoath
Quoted 6 lines · Nick Hoath
---
 drivers/gpu/drm/i915/i915_reg.h         |  8 +++++
 drivers/gpu/drm/i915/intel_pm.c         |  2 ++
 drivers/gpu/drm/i915/intel_ringbuffer.c | 53 +++++++++++++++++++--------------
 3 files changed, 41 insertions(+), 22 deletions(-)

The patch needs to be rebased on the latest -nightly and your "[PATCH 0/3] drm/i915/bxt: add workarounds" patchset. It'd be best to resend it as part of that patchset.

Quoted 14 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 7e1a0fd9..91eef06 100644
@@ -5339,6 +5339,7 @@ enum skl_disp_power_wells {
 
 #define GEN8_L3SQCREG4				0xb118
 #define  GEN8_LQSC_RO_PERF_DIS			(1<<27)
+#define  GEN8_PIPELINE_FLUSH_COHERENT_LINES	(1<<21)
 
 /* GEN8 chicken */
 #define HDC_CHICKEN0				0x7300

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 7333

Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +6 -0
@@ -7324,4 +7325,11 @@ enum skl_disp_power_wells {
 #define _PALETTE_A (dev_priv->info.display_mmio_offset + 0xa000)
 #define _PALETTE_B (dev_priv->info.display_mmio_offset + 0xa800)
 
+/*
+ * Chicken Registers for LLC/eLLC Hot Spotting Avoidance Mode for
+ * 3D/Media Compressed Resources
+ */
+#define GEN9_CHICKEN_MISC1_REG				0x42080
+#define GEN9_CHICKEN_MISC1_NEW_HASH_ENABLE		(1<<15)

Please move this next to CHICKEN_PAR1_1 and use the standard two space indent before the flag name. Also no need for the comment, it doesn't fully describe the register and we don't have similar comments for other registers either.

Quoted 20 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
+
 #endif /* _I915_REG_H_ */
drivers/gpu/drm/i915/intel_pm.c +2 -0
index c3c473d..bbb5d64 100644
@@ -96,6 +96,8 @@ static void skl_init_clock_gating(struct drm_device *dev)
 
 static void bxt_init_clock_gating(struct drm_device *dev)
 {
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
 	gen9_init_clock_gating(dev);
 
 	/* WaVSRefCountFullforceMissDisable:bxt */
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
index 44c7b99..741bdfa 100644

drivers/gpu/drm/i915/intel_ringbuffer.c static int gen9_init_workarounds(struct intel_engine_cs *ring) · line 919

Quoted 5 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -1
@@ -916,7 +916,7 @@ static int gen9_init_workarounds(struct intel_engine_cs *ring)
 	struct drm_device *dev = ring->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
-	/* WaDisablePartialInstShootdown:skl */
+	/* WaDisablePartialInstShootdown:skl,bxt */

It would be better to split out all the parts that only update the WA comments into one separate patch.

Quoted 5 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
 	WA_SET_BIT_MASKED(GEN8_ROW_CHICKEN,
 			  PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE);
 
@@ -924,45 +924,43 @@ static int gen9_init_workarounds(struct intel_engine_cs *ring)
 	WA_SET_BIT_MASKED(HALF_SLICE_CHICKEN3,

drivers/gpu/drm/i915/intel_ringbuffer.c static int gen9_init_workarounds(struct intel_engine_cs *ring) · line 931

Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +5 -3
 			  GEN9_DISABLE_OCL_OOB_SUPPRESS_LOGIC);
 
-	if (INTEL_REVID(dev) == SKL_REVID_A0 ||
-	    INTEL_REVID(dev) == SKL_REVID_B0) {
-		/* WaDisableDgMirrorFixInHalfSliceChicken5:skl */
+	if (
+	    (IS_SKYLAKE(dev) && (INTEL_REVID(dev) == SKL_REVID_A0 ||
+	    INTEL_REVID(dev) == SKL_REVID_B0)) ||
+	    (IS_BROXTON(dev) && INTEL_REVID(dev) == BXT_REVID_A0)
+	    ) {

To align with the coding style please remove the whitespace after the opening '(' and before the closing ')'.

I assume we should use the GT/Display device stepping, not the SOC stepping. Accordingly the above check should be '< BXT_REVID_B0', since steppings 0,1,2 all map to A0 GT/Display device stepping.

Please split out the enabling for each workaround into a separate patch.

drivers/gpu/drm/i915/intel_ringbuffer.c static int gen9_init_workarounds(struct intel_engine_cs *ring) · line 939

Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4 -2
+		/* WaDisableDgMirrorFixInHalfSliceChicken5:skl,bxt */
 		WA_CLR_BIT_MASKED(GEN9_HALF_SLICE_CHICKEN5,
 				  GEN9_DG_MIRROR_FIX_ENABLE);
 	}
 
-	if (IS_SKYLAKE(dev) && INTEL_REVID(dev) <= SKL_REVID_B0) {
-		/* WaSetDisablePixMaskCammingAndRhwoInCommonSliceChicken:skl */
+	if (
+	    (IS_SKYLAKE(dev) && INTEL_REVID(dev) <= SKL_REVID_B0) ||
+	    (IS_BROXTON(dev) && INTEL_REVID(dev) == BXT_REVID_A0)

As above '< BXT_REVID_B0'

Quoted 19 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +7 -2
+	   ) {
+		/* WaSetDisablePixMaskCammingAndRhwoInCommonSliceChicken:skl,bxt */
 		WA_SET_BIT_MASKED(GEN7_COMMON_SLICE_CHICKEN1,
 				  GEN9_RHWO_OPTIMIZATION_DISABLE);
 		WA_SET_BIT_MASKED(GEN9_SLICE_COMMON_ECO_CHICKEN0,
 				  DISABLE_PIXEL_MASK_CAMMING);
 	}
 
-	if (INTEL_REVID(dev) >= SKL_REVID_C0) {
-		/* WaEnableYV12BugFixInHalfSliceChicken7:skl */
+	if (
+	    (IS_SKYLAKE(dev) && INTEL_REVID(dev) >= SKL_REVID_C0) ||
+	    (IS_BROXTON(dev))
+	   ) {
+		/* WaEnableYV12BugFixInHalfSliceChicken7:skl,bxt */
 		WA_SET_BIT_MASKED(GEN9_HALF_SLICE_CHICKEN7,
 				  GEN9_ENABLE_YV12_BUGFIX);
 	}
 

drivers/gpu/drm/i915/intel_ringbuffer.c static int gen9_init_workarounds(struct intel_engine_cs *ring) · line 957

Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -10
-	if (INTEL_REVID(dev) <= SKL_REVID_D0) {
-		/*
-		 *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);
-	}

This should also be in a separate patch.

Quoted 22 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +7 -4
-
-	/* Wa4x4STCOptimizationDisable:skl */
+	/* Wa4x4STCOptimizationDisable:skl,bxt */
 	WA_SET_BIT_MASKED(CACHE_MODE_1, GEN8_4x4_STC_OPTIMIZATION_DISABLE);
 
-	/* WaDisablePartialResolveInVc:skl */
+	/* WaDisablePartialResolveInVc:skl,bxt */
 	WA_SET_BIT_MASKED(CACHE_MODE_1, GEN9_PARTIAL_RESOLVE_IN_VC_DISABLE);
 
-	/* WaCcsTlbPrefetchDisable:skl */
+	/* WaCcsTlbPrefetchDisable:skl,bxt */
 	WA_CLR_BIT_MASKED(GEN9_HALF_SLICE_CHICKEN5,
 			  GEN9_CCS_TLB_PREFETCH_ENABLE);
 
@@ -1024,6 +1022,17 @@ static int skl_init_workarounds(struct intel_engine_cs *ring)
 		WA_SET_BIT_MASKED(HIZ_CHICKEN,
 				  BDW_HIZ_POWER_COMPILER_CLOCK_GATING_DISABLE);
 
+	if (INTEL_REVID(dev) <= SKL_REVID_D0) {
+		/*
+		 *Use Force Non-Coherent whenever executing a 3D context. This
+		 * is a workaround for a possible hang in the unlikely event

drivers/gpu/drm/i915/intel_ringbuffer.c static int skl_init_workarounds(struct intel_engine_cs *ring) · line 1038

Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +7 -0
+		 * a TLB invalidation occurs during a PSD flush.
+		 */
+		/* WaForceEnableNonCoherent:skl */
+		WA_SET_BIT_MASKED(HDC_CHICKEN0,
+				  HDC_FORCE_NON_COHERENT);
+	}
+
 	return skl_tune_iz_hashing(ring);
 }
 

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx