Skip to contentSkip to conversation

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

PATCH In review Keith Packard 2 participants 2 messages Jul 20, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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

---
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +1 -1
index e9d1d5c..e46f273 100644
@@ -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;
 	}
 
Signature · 1 line
1.7.5.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Keith Packard

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

I couldn't find a way to make this any simpler, or spot why it couldn't possible work, so

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

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre