aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-03-31 05:21:57 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-04-11 06:16:53 -0400
commit80e829fade4eea5f07c410df6a551c42e2d0ca9c (patch)
treec347937e2a2d83b0e9154b33866a0bfdc99251b3 /drivers/gpu
parent27c1cbd06a7620b354cbb363834f3bb8df4f410d (diff)
drm/i915: implement ColorBlt w/a
According to an internal workaround master list, we need to set bit 5 of register 9400 to avoid issues with color blits. Testing shows that this seems to fix the blitter hangs when fbc is enabled on snb, thanks to Chris Wilson for figuring this out. Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Michael "brot" Groh <michael.groh@minad.de> Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h3
-rw-r--r--drivers/gpu/drm/i915/intel_display.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 2abf4eb94039..b4bb1ef77ddc 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3728,6 +3728,9 @@
3728#define GT_FIFO_FREE_ENTRIES 0x120008 3728#define GT_FIFO_FREE_ENTRIES 0x120008
3729#define GT_FIFO_NUM_RESERVED_ENTRIES 20 3729#define GT_FIFO_NUM_RESERVED_ENTRIES 20
3730 3730
3731#define GEN6_UCGCTL1 0x9400
3732# define GEN6_BLBUNIT_CLOCK_GATE_DISABLE (1 << 5)
3733
3731#define GEN6_UCGCTL2 0x9404 3734#define GEN6_UCGCTL2 0x9404
3732# define GEN6_RCZUNIT_CLOCK_GATE_DISABLE (1 << 13) 3735# define GEN6_RCZUNIT_CLOCK_GATE_DISABLE (1 << 13)
3733# define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12) 3736# define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f446e66cbdaf..bae38acf44dc 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8556,6 +8556,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
8556 I915_WRITE(WM2_LP_ILK, 0); 8556 I915_WRITE(WM2_LP_ILK, 0);
8557 I915_WRITE(WM1_LP_ILK, 0); 8557 I915_WRITE(WM1_LP_ILK, 0);
8558 8558
8559 I915_WRITE(GEN6_UCGCTL1,
8560 I915_READ(GEN6_UCGCTL1) |
8561 GEN6_BLBUNIT_CLOCK_GATE_DISABLE);
8562
8559 /* According to the BSpec vol1g, bit 12 (RCPBUNIT) clock 8563 /* According to the BSpec vol1g, bit 12 (RCPBUNIT) clock
8560 * gating disable must be set. Failure to set it results in 8564 * gating disable must be set. Failure to set it results in
8561 * flickering pixels due to Z write ordering failures after 8565 * flickering pixels due to Z write ordering failures after