drm/i915: implement a media hang w/a
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 11 Apr 2012 18:42:38 +0000 (20:42 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 17 Apr 2012 09:19:52 +0000 (11:19 +0200)
Contrary to the other clock gating w/a in GEN6_UCGCTL1, this one is
actually documented in Bspec, vol1g "GT Interface Registers [SNB]",
Section 1.5.1 "UCGCTL1 - Unit Level Clock Gating Control 1".

Supposedly this can prevent hangs on the media ring.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c

index 3f7fc4629363e7210987cb796a6406d5399e0181..1124e4f594f5ccca0774bcbfb7d86752785d75a4 100644 (file)
 
 #define GEN6_UCGCTL1                           0x9400
 # define GEN6_BLBUNIT_CLOCK_GATE_DISABLE               (1 << 5)
+# define GEN6_CSUNIT_CLOCK_GATE_DISABLE                        (1 << 7)
 
 #define GEN6_UCGCTL2                           0x9404
 # define GEN6_RCZUNIT_CLOCK_GATE_DISABLE               (1 << 13)
index 2d0dc27323c14ea1dc5c104ef3c2d0a4a97358bf..813cc3cda059eb71d573ccbd35481245abcff8ae 100644 (file)
@@ -8880,7 +8880,8 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 
        I915_WRITE(GEN6_UCGCTL1,
                   I915_READ(GEN6_UCGCTL1) |
-                  GEN6_BLBUNIT_CLOCK_GATE_DISABLE);
+                  GEN6_BLBUNIT_CLOCK_GATE_DISABLE |
+                  GEN6_CSUNIT_CLOCK_GATE_DISABLE);
 
        /* According to the BSpec vol1g, bit 12 (RCPBUNIT) clock
         * gating disable must be set.  Failure to set it results in