[Intel-gfx] [PATCH] drm/i915: Skip GPU wait for scanout pin while wedged
Keith Packard
keithp at keithp.com
Wed Jul 20 01:26:43 CEST 2011
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.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
drivers/gpu/drm/i915/i915_gem.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e9d1d5c..d8d623e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -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
--
1.7.5.4
More information about the Intel-gfx
mailing list