From patchwork Tue Feb 26 11:05:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 2185091 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 046243FCF2 for ; Tue, 26 Feb 2013 11:09:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D0E8FE64C0 for ; Tue, 26 Feb 2013 03:09:34 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 501D1E60EF for ; Tue, 26 Feb 2013 03:02:41 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 26 Feb 2013 03:02:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,739,1355126400"; d="scan'208";a="296016455" Received: from rosetta.fi.intel.com (HELO rosetta) ([10.237.72.51]) by fmsmga002.fm.intel.com with ESMTP; 26 Feb 2013 03:02:23 -0800 Received: by rosetta (Postfix, from userid 1000) id 2AFC9800E4; Tue, 26 Feb 2013 13:05:20 +0200 (EET) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Tue, 26 Feb 2013 13:05:13 +0200 Message-Id: <1361876716-8625-11-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1361876716-8625-1-git-send-email-mika.kuoppala@intel.com> References: <1361876716-8625-1-git-send-email-mika.kuoppala@intel.com> Subject: [Intel-gfx] [PATCH 10/13] drm/i915: mark rings which were waiting when hang happened 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 For guilty batchbuffer analysis later on on ring resets, mark all waiting rings so that we can skip them when trying to find a true culprit for the gpu hang. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_irq.c | 11 +++++++++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index bfe5e84..6664e22 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1761,13 +1761,20 @@ static bool kick_ring(struct intel_ring_buffer *ring) struct drm_device *dev = ring->dev; struct drm_i915_private *dev_priv = dev->dev_private; u32 tmp = I915_READ_CTL(ring); + + ring->hangcheck_was_waiting = false; + if (tmp & RING_WAIT) { DRM_ERROR("Kicking stuck wait on %s\n", ring->name); I915_WRITE_CTL(ring, tmp); - return true; + ring->hangcheck_was_waiting = true; } - return false; + + if ((INTEL_INFO(dev)->gen >= 6) && (tmp & RING_WAIT_SEMAPHORE)) + ring->hangcheck_was_waiting = true; + + return ring->hangcheck_was_waiting; } static bool i915_hangcheck_ring_hung(struct drm_device *dev, diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 97b8f37..573b0ef 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -139,6 +139,7 @@ struct intel_ring_buffer { u32 hangcheck_seqno; int hangcheck_score; + bool hangcheck_was_waiting; void *private; };