diff mbox

drm/i915: Skip GPU wait for scanout pin while wedged

Message ID 1311121733-15526-1-git-send-email-keithp@keithp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Keith Packard July 20, 2011, 12:28 a.m. UTC
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>
---
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Chris Wilson July 20, 2011, 10:28 p.m. UTC | #1
On Tue, 19 Jul 2011 17:28:53 -0700, Keith Packard <keithp@keithp.com> wrote:
> 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>

I couldn't find a way to make this any simpler, or spot why it couldn't
possible work, so
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

For the sake of our sanity, we should document which paths we think can
safely ignore GPU hangs. Can we detect lockups in any other functions?
Would any of the test signals help us diagnose which link in the chain
failed?
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e9d1d5c..e46f273 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3113,7 +3113,7 @@  i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
 
 	if (pipelined != obj->ring) {
 		ret = i915_gem_object_wait_rendering(obj);
-		if (ret)
+		if (ret == -ERESTARTSYS)
 			return ret;
 	}