aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-12-22 17:55:00 -0500
committerKeith Packard <keithp@keithp.com>2012-01-03 12:31:15 -0500
commit42ff6572e5a4a7414330a4ca91f0335da67deca9 (patch)
treedc8937a9bd595065cd73cd51a4baab365a96813b /drivers/gpu
parent7ea29b13e5e3e1e61e612349eb0366efdb6457f3 (diff)
drm/i915: Work around gen7 BLT ring synchronization issues.
Previous to this commit, testing easily reproduced a failure where the seqno would apparently arrive after the IRQ associated with it, with test programs as simple as: for (;;) { glCopyPixels(0, 0, 1, 1); glFinish(); } Various workarounds we've seen for previous generations didn't work to fix this issue, so until new information comes in, replace the IRQ waits on the BLT ring with polling. Signed-off-by: Eric Anholt <eric@anholt.net> Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index f5dae5deca71..d0eb2280d8d9 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -792,6 +792,17 @@ ring_add_request(struct intel_ring_buffer *ring,
792} 792}
793 793
794static bool 794static bool
795gen7_blt_ring_get_irq(struct intel_ring_buffer *ring)
796{
797 /* The BLT ring on IVB appears to have broken synchronization
798 * between the seqno write and the interrupt, so that the
799 * interrupt appears first. Returning false here makes
800 * i915_wait_request() do a polling loop, instead.
801 */
802 return false;
803}
804
805static bool
795gen6_ring_get_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag) 806gen6_ring_get_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
796{ 807{
797 struct drm_device *dev = ring->dev; 808 struct drm_device *dev = ring->dev;
@@ -1557,5 +1568,8 @@ int intel_init_blt_ring_buffer(struct drm_device *dev)
1557 1568
1558 *ring = gen6_blt_ring; 1569 *ring = gen6_blt_ring;
1559 1570
1571 if (IS_GEN7(dev))
1572 ring->irq_get = gen7_blt_ring_get_irq;
1573
1560 return intel_init_ring_buffer(dev, ring); 1574 return intel_init_ring_buffer(dev, ring);
1561} 1575}