All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Skip GPU wait for scanout pin while wedged
@ 2011-07-20  0:28 Keith Packard
  2011-07-20 22:28 ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Packard @ 2011-07-20  0:28 UTC (permalink / raw)
  To: intel-gfx

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(-)

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;
 	}
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] drm/i915: Skip GPU wait for scanout pin while wedged
@ 2011-07-19 23:26 Keith Packard
  2011-07-20  0:03 ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Packard @ 2011-07-19 23:26 UTC (permalink / raw)
  To: intel-gfx

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@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-20 22:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20  0:28 [PATCH] drm/i915: Skip GPU wait for scanout pin while wedged Keith Packard
2011-07-20 22:28 ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2011-07-19 23:26 Keith Packard
2011-07-20  0:03 ` Chris Wilson
2011-07-20  0:22   ` Keith Packard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.