From: Eric Anholt <[email protected]>

As a workaround for IRQ synchronization issues in the gen7 BLT ring,
we want to turn the two wait functions into polling loops.

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]>
(cherry picked from commit 7ea29b13e5e3e1e61e612349eb0366efdb6457f3)

Signed-off-by: Timo Aaltonen <[email protected]>

Please add this to the v3.2.x series. It fixes IVB hanging hard, see
https://bugs.launchpad.net/bugs/999910

---
 drivers/gpu/drm/i915/i915_gem.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3e7c478..3e2edc6 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3312,6 +3312,10 @@ i915_gem_ring_throttle(struct drm_device *dev, struct 
drm_file *file)
 
                        if (ret == 0 && atomic_read(&dev_priv->mm.wedged))
                                ret = -EIO;
+               } else if (wait_for(i915_seqno_passed(ring->get_seqno(ring),
+                                                     seqno) ||
+                                   atomic_read(&dev_priv->mm.wedged), 3000)) {
+                       ret = -EBUSY;
                }
        }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to