From patchwork Sun Sep 13 14:51:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gamari X-Patchwork-Id: 47147 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8DEuwCS027945 for ; Sun, 13 Sep 2009 14:56:58 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A3799E9A9; Sun, 13 Sep 2009 07:56:58 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.150]) by gabe.freedesktop.org (Postfix) with ESMTP id 687559E765 for ; Sun, 13 Sep 2009 07:56:56 -0700 (PDT) Received: by qw-out-1920.google.com with SMTP id 4so701523qwk.12 for ; Sun, 13 Sep 2009 07:56:55 -0700 (PDT) Received: by 10.224.43.164 with SMTP id w36mr4377221qae.336.1252853493619; Sun, 13 Sep 2009 07:51:33 -0700 (PDT) Received: from localhost.localdomain (c-24-63-135-98.hsd1.ma.comcast.net [24.63.135.98]) by mx.google.com with ESMTPS id 2sm4219036qwi.36.2009.09.13.07.51.31 (version=SSLv3 cipher=RC4-MD5); Sun, 13 Sep 2009 07:51:32 -0700 (PDT) From: Ben Gamari To: Jesse Barnes , Chris Wilson , Eric Anholt Date: Sun, 13 Sep 2009 10:51:02 -0400 Message-Id: <1252853462-9236-7-git-send-email-bgamari.foss@gmail.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1252853462-9236-6-git-send-email-bgamari.foss@gmail.com> References: <1252853462-9236-1-git-send-email-bgamari.foss@gmail.com> <1252853462-9236-2-git-send-email-bgamari.foss@gmail.com> <1252853462-9236-3-git-send-email-bgamari.foss@gmail.com> <1252853462-9236-4-git-send-email-bgamari.foss@gmail.com> <1252853462-9236-5-git-send-email-bgamari.foss@gmail.com> <1252853462-9236-6-git-send-email-bgamari.foss@gmail.com> Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 6/6] drm/i915: Hookup chip reset in error handler X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org This patch uses the previously introduced chip reset logic to reset the chip when an error event is detected. Signed-off-by: Ben Gamari --- drivers/gpu/drm/i915/i915_irq.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index dbfcf0a..43bfb36 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -308,6 +308,18 @@ static void i915_error_work_func(struct work_struct *work) DRM_DEBUG("generating error event\n"); kobject_uevent_env(&dev->primary->kdev.kobj, KOBJ_CHANGE, envp); + + if (dev_priv->mm.wedged) { + printk(KERN_ERR "GPU hang detected..."); + if (IS_I965G(dev)) { + printk("resetting..."); + i965_reset(dev, GDRST_RENDER); + printk("done.\n"); + dev_priv->mm.wedged = 0; + } else { + printk("reboot required\n"); + } + } } /**