From patchwork Thu Apr 4 15:32:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 2393361 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 1EB97DF25A for ; Thu, 4 Apr 2013 15:33:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA109E644C for ; Thu, 4 Apr 2013 08:33:09 -0700 (PDT) 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 969E2E5EC7 for ; Thu, 4 Apr 2013 08:28:33 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 04 Apr 2013 08:28:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,409,1363158000"; d="scan'208";a="316925365" Received: from rosetta.fi.intel.com (HELO rosetta) ([10.237.72.186]) by fmsmga002.fm.intel.com with ESMTP; 04 Apr 2013 08:28:32 -0700 Received: by rosetta (Postfix, from userid 1000) id 3D6B6800A2; Thu, 4 Apr 2013 18:32:51 +0300 (EEST) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Thu, 4 Apr 2013 18:32:44 +0300 Message-Id: <1365089568-20457-13-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365089568-20457-1-git-send-email-mika.kuoppala@intel.com> References: <1365089568-20457-1-git-send-email-mika.kuoppala@intel.com> Subject: [Intel-gfx] [PATCH v3 12/16] 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 | 3 ++- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index df40bb2..5acc46e 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1965,7 +1965,8 @@ void i915_hangcheck_elapsed(unsigned long data) ring->hangcheck.score++; /* Kick ring */ - i915_hangcheck_ring_hung(ring); + ring->hangcheck.was_waiting = + !i915_hangcheck_ring_hung(ring); } else { ring->hangcheck.score = 0; } diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 503e913..49c71ff 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -40,6 +40,7 @@ struct intel_hw_status_page { struct intel_ring_hangcheck { u32 seqno; int score; + bool was_waiting; }; struct intel_ring_buffer {