From patchwork Wed Feb 13 02:44:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Santa, Carlos" X-Patchwork-Id: 10809029 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 1208613A4 for ; Wed, 13 Feb 2019 02:45:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F32B72BF08 for ; Wed, 13 Feb 2019 02:45:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7C5D2C0C8; Wed, 13 Feb 2019 02:45:26 +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 A83C62BF08 for ; Wed, 13 Feb 2019 02:45:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1EE6A6E66B; Wed, 13 Feb 2019 02:45:26 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 734F46E65A for ; Wed, 13 Feb 2019 02:45:21 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2019 18:45:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,364,1544515200"; d="scan'208";a="133847898" Received: from miryad.jf.intel.com ([10.54.74.35]) by orsmga002.jf.intel.com with ESMTP; 12 Feb 2019 18:45:21 -0800 From: Carlos Santa To: intel-gfx@lists.freedesktop.org Date: Tue, 12 Feb 2019 18:44:02 -0800 Message-Id: <20190213024402.18842-7-carlos.santa@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190213024402.18842-1-carlos.santa@intel.com> References: <20190213024402.18842-1-carlos.santa@intel.com> Subject: [Intel-gfx] [PATCH v2 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;