From patchwork Thu Feb 14 02:57:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Santa, Carlos" X-Patchwork-Id: 10811649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE1B2922 for ; Thu, 14 Feb 2019 02:57:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBDBF2DB83 for ; Thu, 14 Feb 2019 02:57:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C02932DB9C; Thu, 14 Feb 2019 02:57:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7A5BC2DB83 for ; Thu, 14 Feb 2019 02:57:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ECE7A6E853; Thu, 14 Feb 2019 02:57:52 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id EDC716E84E for ; Thu, 14 Feb 2019 02:57:46 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2019 18:57:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,367,1544515200"; d="scan'208";a="124345921" Received: from miryad.jf.intel.com ([10.54.74.35]) by fmsmga008.fm.intel.com with ESMTP; 13 Feb 2019 18:57:46 -0800 From: Carlos Santa To: intel-gfx@lists.freedesktop.org Date: Wed, 13 Feb 2019 18:57:13 -0800 Message-Id: <20190214025713.34150-7-carlos.santa@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214025713.34150-1-carlos.santa@intel.com> References: <20190214025713.34150-1-carlos.santa@intel.com> Subject: [Intel-gfx] [PATCH v3 6/6] drm/i915: Watchdog timeout: Blindly trust watchdog timeout for reset? X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michel Thierry MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Michel Thierry XXX: What to do when the watchdog irq fired twice but our hangcheck logic thinks the engine is not hung? For example, what if the active-head moved since the irq handler? One option is to just ignore the watchdog, if the engine is really hung, then the driver will detect the hang by itself later on (I'm inclined to this). But the other option is to blindly trust the HW, which is what this patch does... v1: Rebase. CC: Antonio Argenziano Cc: Tvrtko Ursulin Signed-off-by: Michel Thierry Signed-off-by: Carlos Santa --- drivers/gpu/drm/i915/intel_hangcheck.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c b/drivers/gpu/drm/i915/intel_hangcheck.c index bc10acb24d9a..223b79001854 100644 --- a/drivers/gpu/drm/i915/intel_hangcheck.c +++ b/drivers/gpu/drm/i915/intel_hangcheck.c @@ -288,7 +288,8 @@ static void i915_hangcheck_elapsed(struct work_struct *work) hangcheck_accumulate_sample(engine, &hc); hangcheck_store_sample(engine, &hc); - if (hc.stalled) { + if (hc.stalled || + engine->hangcheck.watchdog == intel_engine_get_hangcheck_seqno(engine)) { hung |= engine->mask; if (hc.action != ENGINE_DEAD) stuck |= engine->mask;