From f0b69efc29b024747a88ce020dada425e3193d5a Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@keithp.com>
Date: Tue, 19 Jul 2011 16:21:40 -0700
Subject: [PATCH] drm/i915: Skip GPU wait for scanout pin while wedged
Git-commit: f0b69efc29b024747a88ce020dada425e3193d5a
Patch-mainline: 3.1-rc1

Failing to pin a scanout buffer will most likely lead to a black
screen, so if the GPU is wedged, then just let the pin happen and hope
that things work out OK.

V2: Just ignore any error from i915_gem_object_wait_rendering, as
suggested by Chris Wilson

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3109,7 +3109,7 @@
 
 	if (pipelined != obj->ring) {
 		ret = i915_gem_object_wait_rendering(obj);
-		if (ret)
+		if (ret == -ERESTARTSYS)
 			return ret;
 	}
 
