Ivybridge hang fixes respun
Subsystems (2)
These fix many GPU hangs for Eugeni, though not on my machine for some reason.
Oddly, the register writes to UCGCTL2 and SQ_CHICKEN_MBCUNIT_CONFIG stick, but the writes to L3_CHICKEN_MODE, L3CNTLREG1, and COMMON_SLICE_CHICKEN1 don't seem to take effect. Currently no theories why.
Manually writing these values with intel_reg_write /does/ fix the hangs for me.
I'm fine with these going to -fixes. They seem to help some people, and I highly doubt they'll make anything worse. It'd be nice to understand why the register writes aren't sticking, though...
PATCH 1/4 drm/i915: gen7: implement rczunit workaround
From: Eugeni Dodonov <[email protected]>
This is yet another workaround related to clock gating which we need on Ivy Bridge.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_display.c | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -3618,6 +3618,7 @@#define GT_FIFO_NUM_RESERVED_ENTRIES 20#define GEN6_UCGCTL2 0x9404 +# define GEN6_RCZUNIT_CLOCK_GATE_DISABLE (1 << 13)# define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12)# define GEN6_RCCUNIT_CLOCK_GATE_DISABLE (1 << 11)
drivers/gpu/drm/i915/intel_display.c +5 -0
@@ -8461,6 +8461,11 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)I915_WRITE (WM2_LP_ILK ,0 );I915_WRITE (WM1_LP_ILK ,0 ); +/* According to the spec, bit 13 (RCZUNIT) must be set on IVB. +* This implements the WaDisableRCZUnitClockGating workaround. +*/ +I915_WRITE (GEN6_UCGCTL2 ,GEN6_RCZUNIT_CLOCK_GATE_DISABLE ); +I915_WRITE (ILK_DSPCLK_GATE ,IVB_VRHUNIT_CLK_GATE ); I915_WRITE(IVB_CHICKEN3,
Signature · 1 line
1.7.7.1
Re: [PATCH 1/4] drm/i915: gen7: implement rczunit workaround
Quoted 11 lines · On Wed, 8 Feb 2012 12:53:49 -0800 Kenneth Graunke <[email protected]>…
From: Eugeni Dodonov <[email protected]>
This is yet another workaround related to clock gating which we need on Ivy Bridge.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610Tested-by Eugeni Dodonov <[email protected]>Signed-off-by Eugeni Dodonov <[email protected]>Signed-off-by Kenneth Graunke <[email protected]>---
Ok thanks guys, I've pushed this to my drm-intel-fixes branch ingit://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel.git.
Please shout if anything goes wrong.
Thanks,
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/4 drm/i915: gen7: Implement an L3 caching workaround.
In reply to Kenneth GraunkeFrom: Eugeni Dodonov <[email protected]>
This adds two cache-related workarounds for Ivy Bridge which can lead to 3D ring hangs and corruptions.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610
--- drivers/gpu/drm/i915/i915_reg.h | 7 +++++++ drivers/gpu/drm/i915/intel_display.c | 6 ++++++ 2 files changed, 13 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +7 -0
@@ -3028,6 +3028,13 @@#define DISP_TILE_SURFACE_SWIZZLING (1<<13)#define DISP_FBC_WM_DIS (1<<15) +/* GEN7 chicken */ +#define GEN7_L3CNTLREG1 0xB01C +#define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C4FFF8C + +#define GEN7_L3_CHICKEN_MODE_REGISTER 0xB030 +#define GEN7_WA_L3_CHICKEN_MODE 0x20000000 +/* PCH */ /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +6 -0
@@ -8472,6 +8472,12 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE | CHICKEN3_DGMG_DONE_FIX_DISABLE); +/* WaApplyL3ControlAndL3ChickenMode requires those two on Ivy Bridge */ +I915_WRITE (GEN7_L3CNTLREG1 , +GEN7_WA_FOR_GEN7_L3_CONTROL ); +I915_WRITE (GEN7_L3_CHICKEN_MODE_REGISTER , +GEN7_WA_L3_CHICKEN_MODE ); +for_each_pipe (pipe) { I915_WRITE(DSPCNTR(pipe), I915_READ(DSPCNTR(pipe)) |
Signature · 1 line
1.7.7.1
PATCH 3/4 drm/i915: gen7: work around a system hang on IVB
In reply to Kenneth GraunkeFrom: Eugeni Dodonov <[email protected]>
This adds the workaround for WaCatErrorRejectionIssue which could result in a system hang.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610
--- drivers/gpu/drm/i915/i915_reg.h | 4 ++++ drivers/gpu/drm/i915/intel_display.c | 5 +++++ 2 files changed, 9 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -3035,6 +3035,10 @@#define GEN7_L3_CHICKEN_MODE_REGISTER 0xB030#define GEN7_WA_L3_CHICKEN_MODE 0x20000000 +/* WaCatErrorRejectionIssue */ +#define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030 +#define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) +/* PCH */ /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +5 -0
@@ -8478,6 +8478,11 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)I915_WRITE (GEN7_L3_CHICKEN_MODE_REGISTER ,GEN7_WA_L3_CHICKEN_MODE ); +/* This is required by WaCatErrorRejectionIssue */ +I915_WRITE (GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +I915_READ (GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | +GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +for_each_pipe (pipe) { I915_WRITE(DSPCNTR(pipe), I915_READ(DSPCNTR(pipe)) |
Signature · 1 line
1.7.7.1
PATCH 4/4 drm/i915: gen7: Disable the RHWO optimization as it can cause GPU hangs.
In reply to Kenneth GraunkeThe BSpec Workarounds page states that bits 10 and 26 must be set to avoid 3D ring hangs.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610
--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -3029,6 +3029,9 @@#define DISP_FBC_WM_DIS (1<<15)/* GEN7 chicken */ +#define GEN7_COMMON_SLICE_CHICKEN1 0x7010 +# define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC ((1<<10) | (1<<26)) +#define GEN7_L3CNTLREG1 0xB01C#define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C4FFF8C
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -8472,6 +8472,10 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE | CHICKEN3_DGMG_DONE_FIX_DISABLE); +/* Apply the WaDisableRHWOOptimizationForRenderHang workaround. */ +I915_WRITE (GEN7_COMMON_SLICE_CHICKEN1 , +GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC ); +/* WaApplyL3ControlAndL3ChickenMode requires those two on Ivy Bridge */ I915_WRITE (GEN7_L3CNTLREG1 ,GEN7_WA_FOR_GEN7_L3_CONTROL );
Signature · 1 line
1.7.7.1
Quoted 7 lines · Kenneth Graunke
These fix many GPU hangs for Eugeni, though not on my machine for some reason.
Oddly, the register writes to UCGCTL2 and
SQ_CHICKEN_MBCUNIT_CONFIGstick, but the writes toL3_CHICKEN_MODE, L3CNTLREG1, andCOMMON_SLICE_CHICKEN1don't seem to take effect. Currently no theories why.
Quoted 7 lines
Manually writing these values with
intel_reg_write/does/ fix the hangs for me.I'm fine with these going to -fixes. They seem to help some people, and I highly doubt they'll make anything worse. It'd be nice to understand why the register writes aren't sticking, though...
Complementing Ken's mail, Li Bo from our QA team has did a full round of tests with these patches on IVB and all known issues were gone apparently.
Keith, Jesse - I think they are good -fixes candidates at this point.
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
<#part sign=pgpmime>
Quoted 1 line · Eugeni Dodonov
Keith, Jesse - I think they are good -fixes candidates at this point.
I'll be sending a pull request today without these; please work with Jesse to get them merged after that.
Signature · 1 line
[email protected]