From patchwork Tue Jun 25 15:26:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 2777561 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BEEC5C0AB1 for ; Tue, 25 Jun 2013 15:27:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0E1B202EB for ; Tue, 25 Jun 2013 15:27:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0AF66202E6 for ; Tue, 25 Jun 2013 15:27:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC16FE5F60 for ; Tue, 25 Jun 2013 08:27:26 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 204DFE61BB for ; Tue, 25 Jun 2013 08:26:45 -0700 (PDT) Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 25 Jun 2013 08:26:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,937,1363158000"; d="scan'208";a="259930641" Received: from rosetta.fi.intel.com (HELO rosetta) ([10.237.72.67]) by AZSMGA002.ch.intel.com with ESMTP; 25 Jun 2013 08:26:43 -0700 Received: by rosetta (Postfix, from userid 1000) id B74B380079; Tue, 25 Jun 2013 18:26:42 +0300 (EEST) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Tue, 25 Jun 2013 18:26:40 +0300 Message-Id: <1372174001-26493-2-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1372174001-26493-1-git-send-email-mika.kuoppala@intel.com> References: <1372174001-26493-1-git-send-email-mika.kuoppala@intel.com> Cc: miku@iki.fi Subject: [Intel-gfx] [PATCH 2/3] drm/i915: no hangcheck when reset is in progress X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 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+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The timer for hangchecking can run again before the previous reset it has triggered has been handled. This can corrupt the hangcheck state as reset handling will access and write to the hangcheck data. To prevent this, avoid running the hangcheck logic while reset is in progress. Signed-off-by: Mika Kuoppala Reviewed-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_irq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 3a25a6c..e709a47 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2434,6 +2434,9 @@ void i915_hangcheck_elapsed(unsigned long data) if (!i915_enable_hangcheck) return; + if (i915_reset_in_progress(&dev_priv->gpu_error)) + return; + for_each_ring(ring, dev_priv, i) { u32 seqno, acthd; bool busy = true;