All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: Skip GPU wait for scanout pin while wedged
Date: Tue, 19 Jul 2011 16:26:43 -0700	[thread overview]
Message-ID: <1311118003-3443-1-git-send-email-keithp@keithp.com> (raw)

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

             reply	other threads:[~2011-07-19 23:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 23:26 Keith Packard [this message]
2011-07-20  0:03 ` [PATCH] drm/i915: Skip GPU wait for scanout pin while wedged Chris Wilson
2011-07-20  0:22   ` Keith Packard
2011-07-29 21:47     ` [PATCH] drm/i915: Ignored GPU wedged errors while pinning scanout buffers Keith Packard
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311118003-3443-1-git-send-email-keithp@keithp.com \
    --to=keithp@keithp.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.