From: Keith Packard Subject: [PATCH] drm/i915: Skip GPU wait for scanout pin while wedged Date: Tue, 19 Jul 2011 16:26:43 -0700 Message-ID: <1311118003-3443-1-git-send-email-keithp@keithp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id D6A459E974 for ; Tue, 19 Jul 2011 16:26:55 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 80654C74016 for ; Tue, 19 Jul 2011 16:26:55 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 --- 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