drm/i915: add L3 bank clock gating disable on VLV
authorJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 14 Jun 2012 18:04:50 +0000 (11:04 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 18 Jun 2012 16:41:47 +0000 (18:41 +0200)
Prevents a possible hang: WaDisableL3Bank2xClockGate.

v2: only apply to VLV, IVB doesn't need this anymore

References: https://bugs.freedesktop.org/show_bug.cgi?id=50245
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_pm.c

index 5d7cf5f..782e5d1 100644 (file)
 # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE              (1 << 12)
 # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE               (1 << 11)
 
+#define GEN7_UCGCTL4                           0x940c
+#define  GEN7_L3BANK2X_CLOCK_GATE_DISABLE      (1<<25)
+
 #define GEN6_RPNSWREQ                          0xA008
 #define   GEN6_TURBO_DISABLE                   (1<<31)
 #define   GEN6_FREQUENCY(x)                    ((x)<<25)
index 47c1a3e..17c16f0 100644 (file)
@@ -3517,6 +3517,8 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
                   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
                   GEN6_RCCUNIT_CLOCK_GATE_DISABLE);
 
+       I915_WRITE(GEN7_UCGCTL4, GEN7_L3BANK2X_CLOCK_GATE_DISABLE);
+
        for_each_pipe(pipe) {
                I915_WRITE(DSPCNTR(pipe),
                           I915_READ(DSPCNTR(pipe)) |