drm/i915: Skip GPU wait for scanout pin while wedged
Subsystems (2)
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.
--- drivers/gpu/drm/i915/i915_gem.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +9 -3
@@ -3112,9 +3112,15 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,return ret;if (pipelined != obj->ring) { - ret =i915_gem_object_wait_rendering (obj); -if (ret) -return ret; +struct drm_device *dev = obj->base.dev; +drm_i915_private_t *dev_priv = dev->dev_private; +if (atomic_read (&dev_priv->mm.wedged)) { +DRM_ERROR ("Skip GPU wait for scanout while wedged\n" ); + }else { + ret =i915_gem_object_wait_rendering (obj); +if (ret) +return ret; + } }/* The display engine is not coherent with the LLC cache on gen6. As
Signature · 1 line
1.7.5.4
Quoted 3 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.
This doesn't prevent us returning an error should the wait-rendering abort due to a GPU hang occurring in the middle of the wait.
i915_gem_object_pin_to_display_plane is used for more than just the scanout, cursors and overlay are also included, otherwise we could just ignore any errors. So,
/* Update the display engine regardless of any GPU hangs */ if (ret == -ERESTARTSYS)
return ret;
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 2 lines · Chris Wilson
This doesn't prevent us returning an error should the wait-rendering abort due to a GPU hang occurring in the middle of the wait.
Yeah, should probably check the return value and ignore the error instead.
Quoted 3 lines
i915_gem_object_pin_to_display_planeis used for more than just the scanout, cursors and overlay are also included, otherwise we could just ignore any errors. So,
Given that the GPU is wedged, I don't see any problem pinning any of these instead of failing.
Quoted 3 lines
/* Update the display engine regardless of any GPU hangs */ if (ret ==
-ERESTARTSYS)return ret;
Yeah, that seems simpler in all ways. Much nicer.
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: Ignored GPU wedged errors while pinning scanout buffers
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.
--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +1 -1
@@ -3019,7 +3019,7 @@ i915_gem_object_set_to_display_plane(struct drm_i915_gem_object *obj,/* Currently, we are always called from an non-interruptible context. */ 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