Skip to contentSkip to conversation

drm/i915/bdw: Force all Data Cache Data Port access to be Non-Coherent

PATCH Superseded Ben Widawsky 6 participants 9 messages Dec 12, 2013 – Dec 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915/bdw: Force all Data Cache Data Port access to be Non-Coherent

I stumbled on to some unimplemented errata. To be honest, I am not really sure of the impact, just that the docs say to do.

No w/a name for this one.

Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_reg.h | 4 ++++
 drivers/gpu/drm/i915/intel_pm.c | 7 +++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index e8cc27c..3259e83 100644
@@ -4167,6 +4167,10 @@
 #define GEN7_L3SQCREG4				0xb034
 #define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
 
+/* GEN8 chicken */
+#define HDC_CHICKEN0				0x7300
+#define  HDC_FORCE_NON_COHERENT			(1<<4)
+
 /* WaCatErrorRejectionIssue */
 #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
 #define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
drivers/gpu/drm/i915/intel_pm.c +7 -0
index ac9dd46..7e2a0e9 100644
@@ -5279,6 +5279,13 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 			   I915_READ(CHICKEN_PIPESL_1(i) |
 				     DPRS_MASK_VBLANK_SRD));
 	}
+
+	/* Use Force Non-Coherent whenever executing a 3D context. This is a
+	 * workaround for for a possible hang in the unlikely event a TLB
+	 * invalidation occurs during a PSD flush.
+	 */
+	I915_WRITE(HDC_FORCE_NON_COHERENT,
+		   I915_READ(HDC_CHICKEN0) | HDC_FORCE_NON_COHERENT);
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 1 line
1.8.5.1
#1 lore raw

PATCH 2/2 drm/i915/bdw: Implement ff workarounds

WaVSRefCountFullforceMissDisable and
WaDSRefCountFullforceMissDisable

VS is a carry-over from HSW, and DS is likely not used by anyone yet.

Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_reg.h |  1 +
 drivers/gpu/drm/i915/intel_pm.c | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 3259e83..f1eece4 100644
@@ -1003,6 +1003,7 @@
 
 #define GEN7_FF_THREAD_MODE		0x20a0
 #define   GEN7_FF_SCHED_MASK		0x0077070
+#define   GEN8_FF_DS_REF_CNT_FFME	(1 << 19)
 #define   GEN7_FF_TS_SCHED_HS1		(0x5<<16)
 #define   GEN7_FF_TS_SCHED_HS0		(0x3<<16)
 #define   GEN7_FF_TS_SCHED_LOAD_BALANCE	(0x1<<16)
drivers/gpu/drm/i915/intel_pm.c +8 -3
index 7e2a0e9..424a9d8 100644
@@ -5266,14 +5266,14 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
 		   _MASKED_BIT_ENABLE(GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE));
 
-	/* WaSwitchSolVfFArbitrationPriority */
+	/* WaSwitchSolVfFArbitrationPriority:bdw */
 	I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) | HSW_ECOCHK_ARB_PRIO_SOL);
 
-	/* WaPsrDPAMaskVBlankInSRD */
+	/* WaPsrDPAMaskVBlankInSRD:bdw */
 	I915_WRITE(CHICKEN_PAR1_1,
 		   I915_READ(CHICKEN_PAR1_1) | DPA_MASK_VBLANK_SRD);
 
-	/* WaPsrDPRSUnmaskVBlankInSRD */
+	/* WaPsrDPRSUnmaskVBlankInSRD:bdw */
 	for_each_pipe(i) {
 		I915_WRITE(CHICKEN_PIPESL_1(i),
 			   I915_READ(CHICKEN_PIPESL_1(i) |
@@ -5286,6 +5286,11 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	 */
 	I915_WRITE(HDC_FORCE_NON_COHERENT,
 		   I915_READ(HDC_CHICKEN0) | HDC_FORCE_NON_COHERENT);
+
+	/* WaVSRefCountFullforceMissDisable:bdw */
+	/* WaDSRefCountFullforceMissDisable:bdw */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
+		   I915_READ(GEN7_FF_THREAD_MODE) & ~(GEN8_FF_DS_REF_CNT_FFME | GEN7_FF_VS_REF_CNT_FFME));
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 1 line
1.8.5.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/i915/bdw: Implement ff workarounds

Quoted 7 lines · Ben Widawsky

WaVSRefCountFullforceMissDisable and
WaDSRefCountFullforceMissDisable

VS is a carry-over from HSW, and DS is likely not used by anyone yet.

Cc Kenneth Graunke <[email protected]>
Quoted 58 lines
---
 drivers/gpu/drm/i915/i915_reg.h |  1 +
 drivers/gpu/drm/i915/intel_pm.c | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 3259e83..f1eece4 100644
@@ -1003,6 +1003,7 @@
 
 #define GEN7_FF_THREAD_MODE		0x20a0
 #define   GEN7_FF_SCHED_MASK		0x0077070
+#define   GEN8_FF_DS_REF_CNT_FFME	(1 << 19)
 #define   GEN7_FF_TS_SCHED_HS1		(0x5<<16)
 #define   GEN7_FF_TS_SCHED_HS0		(0x3<<16)
 #define   GEN7_FF_TS_SCHED_LOAD_BALANCE	(0x1<<16)
drivers/gpu/drm/i915/intel_pm.c +8 -3
index 7e2a0e9..424a9d8 100644
@@ -5266,14 +5266,14 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
 		   _MASKED_BIT_ENABLE(GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE));
 
-	/* WaSwitchSolVfFArbitrationPriority */
+	/* WaSwitchSolVfFArbitrationPriority:bdw */
 	I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) | HSW_ECOCHK_ARB_PRIO_SOL);
 
-	/* WaPsrDPAMaskVBlankInSRD */
+	/* WaPsrDPAMaskVBlankInSRD:bdw */
 	I915_WRITE(CHICKEN_PAR1_1,
 		   I915_READ(CHICKEN_PAR1_1) | DPA_MASK_VBLANK_SRD);
 
-	/* WaPsrDPRSUnmaskVBlankInSRD */
+	/* WaPsrDPRSUnmaskVBlankInSRD:bdw */
 	for_each_pipe(i) {
 		I915_WRITE(CHICKEN_PIPESL_1(i),
 			   I915_READ(CHICKEN_PIPESL_1(i) |
@@ -5286,6 +5286,11 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	 */
 	I915_WRITE(HDC_FORCE_NON_COHERENT,
 		   I915_READ(HDC_CHICKEN0) | HDC_FORCE_NON_COHERENT);
+
+	/* WaVSRefCountFullforceMissDisable:bdw */
+	/* WaDSRefCountFullforceMissDisable:bdw */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
+		   I915_READ(GEN7_FF_THREAD_MODE) & ~(GEN8_FF_DS_REF_CNT_FFME | GEN7_FF_VS_REF_CNT_FFME));
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 6 lines
1.8.5.1

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

Re: [PATCH 2/2] drm/i915/bdw: Implement ff workarounds

Quoted 45 lines · Damien Lespiau
Quoted 7 lines · Ben Widawsky

WaVSRefCountFullforceMissDisable and
WaDSRefCountFullforceMissDisable

VS is a carry-over from HSW, and DS is likely not used by anyone yet.

Cc Kenneth Graunke <[email protected]>
Quoted 34 lines
---
 drivers/gpu/drm/i915/i915_reg.h |  1 +
 drivers/gpu/drm/i915/intel_pm.c | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 3259e83..f1eece4 100644
@@ -1003,6 +1003,7 @@
 
 #define GEN7_FF_THREAD_MODE		0x20a0
 #define   GEN7_FF_SCHED_MASK		0x0077070
+#define   GEN8_FF_DS_REF_CNT_FFME	(1 << 19)
 #define   GEN7_FF_TS_SCHED_HS1		(0x5<<16)
 #define   GEN7_FF_TS_SCHED_HS0		(0x3<<16)
 #define   GEN7_FF_TS_SCHED_LOAD_BALANCE	(0x1<<16)
drivers/gpu/drm/i915/intel_pm.c +2 -2
index 7e2a0e9..424a9d8 100644
@@ -5266,14 +5266,14 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
 		   _MASKED_BIT_ENABLE(GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE));
 
-	/* WaSwitchSolVfFArbitrationPriority */
+	/* WaSwitchSolVfFArbitrationPriority:bdw */
 	I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) | HSW_ECOCHK_ARB_PRIO_SOL);
 
-	/* WaPsrDPAMaskVBlankInSRD */
+	/* WaPsrDPAMaskVBlankInSRD:bdw */
 	I915_WRITE(CHICKEN_PAR1_1,
 		   I915_READ(CHICKEN_PAR1_1) | DPA_MASK_VBLANK_SRD);
 
Quoted 14 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +1 -1
-	/* WaPsrDPRSUnmaskVBlankInSRD */
+	/* WaPsrDPRSUnmaskVBlankInSRD:bdw */
 	for_each_pipe(i) {
 		I915_WRITE(CHICKEN_PIPESL_1(i),
 			   I915_READ(CHICKEN_PIPESL_1(i) |

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 5293

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +5 -0
@@ -5286,6 +5286,11 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	 */
 	I915_WRITE(HDC_FORCE_NON_COHERENT,
 		   I915_READ(HDC_CHICKEN0) | HDC_FORCE_NON_COHERENT);
+
+	/* WaVSRefCountFullforceMissDisable:bdw */
+	/* WaDSRefCountFullforceMissDisable:bdw */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
+		   I915_READ(GEN7_FF_THREAD_MODE) & ~(GEN8_FF_DS_REF_CNT_FFME | GEN7_FF_VS_REF_CNT_FFME));

Even with loads of fugde this is too long. I've broken it. Otherwise both patches applied, thanks.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] drm/i915/bdw: Implement ff workarounds

In reply to Ben Widawsky
Quoted 4 lines · Ben Widawsky

WaVSRefCountFullforceMissDisable and
WaDSRefCountFullforceMissDisable

VS is a carry-over from HSW, and DS is likely not used by anyone yet.

You're correct that no one uses DS; we don't support GL 4.0's tessellation shaders yet.

I was about to comment that the Haswell workaround is missing, but it's just implemented in a different function: gen7_setup_fixed_func_scheduler.

Both patches are:

Too late to get tagged, but still under 24 hours after posting...

Quoted 55 lines
Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_reg.h |  1 +
 drivers/gpu/drm/i915/intel_pm.c | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 3259e83..f1eece4 100644
@@ -1003,6 +1003,7 @@
 
 #define GEN7_FF_THREAD_MODE		0x20a0
 #define   GEN7_FF_SCHED_MASK		0x0077070
+#define   GEN8_FF_DS_REF_CNT_FFME	(1 << 19)
 #define   GEN7_FF_TS_SCHED_HS1		(0x5<<16)
 #define   GEN7_FF_TS_SCHED_HS0		(0x3<<16)
 #define   GEN7_FF_TS_SCHED_LOAD_BALANCE	(0x1<<16)
drivers/gpu/drm/i915/intel_pm.c +8 -3
index 7e2a0e9..424a9d8 100644
@@ -5266,14 +5266,14 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
 		   _MASKED_BIT_ENABLE(GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE));
 
-	/* WaSwitchSolVfFArbitrationPriority */
+	/* WaSwitchSolVfFArbitrationPriority:bdw */
 	I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) | HSW_ECOCHK_ARB_PRIO_SOL);
 
-	/* WaPsrDPAMaskVBlankInSRD */
+	/* WaPsrDPAMaskVBlankInSRD:bdw */
 	I915_WRITE(CHICKEN_PAR1_1,
 		   I915_READ(CHICKEN_PAR1_1) | DPA_MASK_VBLANK_SRD);
 
-	/* WaPsrDPRSUnmaskVBlankInSRD */
+	/* WaPsrDPRSUnmaskVBlankInSRD:bdw */
 	for_each_pipe(i) {
 		I915_WRITE(CHICKEN_PIPESL_1(i),
 			   I915_READ(CHICKEN_PIPESL_1(i) |
@@ -5286,6 +5286,11 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	 */
 	I915_WRITE(HDC_FORCE_NON_COHERENT,
 		   I915_READ(HDC_CHICKEN0) | HDC_FORCE_NON_COHERENT);
+
+	/* WaVSRefCountFullforceMissDisable:bdw */
+	/* WaDSRefCountFullforceMissDisable:bdw */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
+		   I915_READ(GEN7_FF_THREAD_MODE) & ~(GEN8_FF_DS_REF_CNT_FFME | GEN7_FF_VS_REF_CNT_FFME));
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
#5 lore raw
In reply to Ben Widawsky
Quoted 32 lines · Ben Widawsky

I stumbled on to some unimplemented errata. To be honest, I am not really sure of the impact, just that the docs say to do.

No w/a name for this one.

Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_reg.h | 4 ++++
 drivers/gpu/drm/i915/intel_pm.c | 7 +++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index e8cc27c..3259e83 100644
@@ -4167,6 +4167,10 @@
 #define GEN7_L3SQCREG4				0xb034
 #define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
 
+/* GEN8 chicken */
+#define HDC_CHICKEN0				0x7300
+#define  HDC_FORCE_NON_COHERENT			(1<<4)
+
 /* WaCatErrorRejectionIssue */
 #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
 #define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index ac9dd46..7e2a0e9 100644

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 5287

Quoted 9 lines
drivers/gpu/drm/i915/intel_pm.c +6 -0
@@ -5279,6 +5279,13 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 			   I915_READ(CHICKEN_PIPESL_1(i) |
 				     DPRS_MASK_VBLANK_SRD));
 	}
+
+	/* Use Force Non-Coherent whenever executing a 3D context. This is a
+	 * workaround for for a possible hang in the unlikely event a TLB
+	 * invalidation occurs during a PSD flush.
+	 */
+	I915_WRITE(HDC_FORCE_NON_COHERENT,

It should be HDC_CHICKEN0 instead of HDC_FORCE_NON_COHERENT

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 5288

Quoted 1 line
drivers/gpu/drm/i915/intel_pm.c +1 -0
+		   I915_READ(HDC_CHICKEN0) | HDC_FORCE_NON_COHERENT);

It has a mask bit which should be set for writing

Quoted 3 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
#6 lore raw
Quoted 45 lines · Haihao
Quoted 32 lines · Ben Widawsky

I stumbled on to some unimplemented errata. To be honest, I am not really sure of the impact, just that the docs say to do.

No w/a name for this one.

Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_reg.h | 4 ++++
 drivers/gpu/drm/i915/intel_pm.c | 7 +++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index e8cc27c..3259e83 100644
@@ -4167,6 +4167,10 @@
 #define GEN7_L3SQCREG4				0xb034
 #define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
 
+/* GEN8 chicken */
+#define HDC_CHICKEN0				0x7300
+#define  HDC_FORCE_NON_COHERENT			(1<<4)
+
 /* WaCatErrorRejectionIssue */
 #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
 #define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index ac9dd46..7e2a0e9 100644

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 5287

Quoted 9 lines
drivers/gpu/drm/i915/intel_pm.c +6 -0
@@ -5279,6 +5279,13 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 			   I915_READ(CHICKEN_PIPESL_1(i) |
 				     DPRS_MASK_VBLANK_SRD));
 	}
+
+	/* Use Force Non-Coherent whenever executing a 3D context. This is a
+	 * workaround for for a possible hang in the unlikely event a TLB
+	 * invalidation occurs during a PSD flush.
+	 */
+	I915_WRITE(HDC_FORCE_NON_COHERENT,

It should be HDC_CHICKEN0 instead of HDC_FORCE_NON_COHERENT

Quoted 9 lines

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 5288

Quoted 1 line
drivers/gpu/drm/i915/intel_pm.c +1 -0
+		   I915_READ(HDC_CHICKEN0) | HDC_FORCE_NON_COHERENT);

It has a mask bit which should be set for writing

Quoted 3 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)

Damn, sorry - I sent the wrong patch. Thanks for catching it.

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#7 lore raw

PATCH v2 1/2 drm/i915/bdw: Force all Data Cache Data Port access to be Non-Coherent

In reply to Xiang, Haihao

I stumbled on to some unimplemented errata. To be honest, I am not really sure of the impact, just that the docs say to do.

No w/a name for this one.

v2: v1 was a stale thing which should have never seen the light of day. (Haihao)

Cc Kenneth Graunke <[email protected]>
---
 drivers/gpu/drm/i915/i915_reg.h | 4 ++++
 drivers/gpu/drm/i915/intel_pm.c | 8 ++++++++
 2 files changed, 12 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index e8cc27c..3259e83 100644
@@ -4167,6 +4167,10 @@
 #define GEN7_L3SQCREG4				0xb034
 #define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
 
+/* GEN8 chicken */
+#define HDC_CHICKEN0				0x7300
+#define  HDC_FORCE_NON_COHERENT			(1<<4)
+
 /* WaCatErrorRejectionIssue */
 #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
 #define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
drivers/gpu/drm/i915/intel_pm.c +8 -0
index ac9dd46..0665e37 100644
@@ -5279,6 +5279,14 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 			   I915_READ(CHICKEN_PIPESL_1(i) |
 				     DPRS_MASK_VBLANK_SRD));
 	}
+
+	/* Use Force Non-Coherent whenever executing a 3D context. This is a
+	 * workaround for for a possible hang in the unlikely event a TLB
+	 * invalidation occurs during a PSD flush.
+	 */
+	I915_WRITE(HDC_CHICKEN0,
+		   I915_READ(HDC_CHICKEN0) |
+		   _MASKED_BIT_ENABLE(HDC_FORCE_NON_COHERENT));
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 1 line
1.8.4.2
Reviewed-by on v2 1/2
#8 lore raw
Quoted 4 lines · Ben Widawsky

I stumbled on to some unimplemented errata. To be honest, I am not really sure of the impact, just that the docs say to do.

No w/a name for this one.

WaForceEnableNonCoherent looks like a good candidate.

Quoted 5 lines

v2: v1 was a stale thing which should have never seen the light of day. (Haihao)

Cc Kenneth Graunke <[email protected]>
Quoted 46 lines
---
 drivers/gpu/drm/i915/i915_reg.h | 4 ++++
 drivers/gpu/drm/i915/intel_pm.c | 8 ++++++++
 2 files changed, 12 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index e8cc27c..3259e83 100644
@@ -4167,6 +4167,10 @@
 #define GEN7_L3SQCREG4				0xb034
 #define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
 
+/* GEN8 chicken */
+#define HDC_CHICKEN0				0x7300
+#define  HDC_FORCE_NON_COHERENT			(1<<4)
+
 /* WaCatErrorRejectionIssue */
 #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
 #define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
drivers/gpu/drm/i915/intel_pm.c +8 -0
index ac9dd46..0665e37 100644
@@ -5279,6 +5279,14 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 			   I915_READ(CHICKEN_PIPESL_1(i) |
 				     DPRS_MASK_VBLANK_SRD));
 	}
+
+	/* Use Force Non-Coherent whenever executing a 3D context. This is a
+	 * workaround for for a possible hang in the unlikely event a TLB
+	 * invalidation occurs during a PSD flush.
+	 */
+	I915_WRITE(HDC_CHICKEN0,
+		   I915_READ(HDC_CHICKEN0) |
+		   _MASKED_BIT_ENABLE(HDC_FORCE_NON_COHERENT));
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 6 lines
1.8.4.2

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