Skip to content

Commit

Permalink
drm/i915: Work around gen7 BLT ring synchronization issues.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Eugeni Dodonov <[email protected]>
Reviewed-by: Eugeni Dodonov <[email protected]>
Acked-by: Kenneth Graunke <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
  • Loading branch information
anholt authored and keith-packard committed Jan 3, 2012
1 parent 7ea29b1 commit 42ff657
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/gpu/drm/i915/intel_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,17 @@ ring_add_request(struct intel_ring_buffer *ring,
return 0;
}

static bool
gen7_blt_ring_get_irq(struct intel_ring_buffer *ring)
{
/* The BLT ring on IVB appears to have broken synchronization
* between the seqno write and the interrupt, so that the
* interrupt appears first. Returning false here makes
* i915_wait_request() do a polling loop, instead.
*/
return false;
}

static bool
gen6_ring_get_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
{
Expand Down Expand Up @@ -1557,5 +1568,8 @@ int intel_init_blt_ring_buffer(struct drm_device *dev)

*ring = gen6_blt_ring;

if (IS_GEN7(dev))
ring->irq_get = gen7_blt_ring_get_irq;

return intel_init_ring_buffer(dev, ring);
}

0 comments on commit 42ff657

Please sign in to comment.