diff mbox

[1/6] drm/i915: Check whether chip is wedged in i915_wait_request()

Message ID 1252853462-9236-2-git-send-email-bgamari.foss@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

Ben Gamari Sept. 13, 2009, 2:50 p.m. UTC
i915_wait_request() only checks mm.wedged after it interacts with the
hardware, generally causing the driver to lock up waiting for a wedged
chip. Make sure we check mm.wedged as the first thing we do.
---
 drivers/gpu/drm/i915/i915_gem.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Ben Gamari Sept. 13, 2009, 4:30 p.m. UTC | #1
On Sun, Sep 13, 2009 at 10:50:57AM -0400, Ben Gamari wrote:
> i915_wait_request() only checks mm.wedged after it interacts with the
> hardware, generally causing the driver to lock up waiting for a wedged
> chip. Make sure we check mm.wedged as the first thing we do.

Signed-Off-By: Ben Gamari <bgamari.foss@gmail.com>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e0da986..9100513 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1751,6 +1751,9 @@  i915_wait_request(struct drm_device *dev, uint32_t seqno)
 
 	BUG_ON(seqno == 0);
 
+	if (dev_priv->mm.wedged)
+		return -EIO;
+
 	if (!i915_seqno_passed(i915_get_gem_seqno(dev), seqno)) {
 		if (IS_IGDNG(dev))
 			ier = I915_READ(DEIER) | I915_READ(GTIER);