From patchwork Thu Sep 5 12:07:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 11132951 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEB1A1709 for ; Thu, 5 Sep 2019 12:07:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A04C621848 for ; Thu, 5 Sep 2019 12:07:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A04C621848 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 19E2B6E09A; Thu, 5 Sep 2019 12:07:23 +0000 (UTC) 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 ESMTPS id 15FF46E095; Thu, 5 Sep 2019 12:07:22 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2019 05:07:21 -0700 X-IronPort-AV: E=Sophos;i="5.64,470,1559545200"; d="scan'208";a="358428116" Received: from jkrzyszt-desk.igk.intel.com ([172.22.244.17]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2019 05:07:18 -0700 From: Janusz Krzysztofik To: Chris Wilson , Daniel Vetter , Tvrtko Ursulin , Martin Peres Date: Thu, 5 Sep 2019 14:07:10 +0200 Message-Id: <20190905120710.24770-1-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib: Don't use full reset on simulated hardware 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: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" If DROP_RESET_ACTIVE is requested while there is a large queue of pending GEM requests, waiting for idle engines performed as a first step of i915_gem_drop_caches debugfs request handler times out and an otherwise healthy device is marked wedged. If that happens while reset capabilities are disabled or not supported, there is no possibility to successfully reset the device after requests are retired. Avoid fake GPU terminally wedged conditions by not requesting DROP_RESET_ACTIVE from exit handler when running on simulated hardware. As a side effect, terminating a very busy test and running a subsequent one may take quite a while. Signed-off-by: Janusz Krzysztofik --- lib/drmtest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index c379a7b7..b73bc132 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -318,7 +318,8 @@ static void __cancel_work_at_exit(int fd) igt_sysfs_set_parameter(fd, "reset", "%x", -1u /* any method */); igt_drop_caches_set(fd, /* cancel everything */ - DROP_RESET_ACTIVE | DROP_RESET_SEQNO | + igt_run_in_simulation() ? 0 : DROP_RESET_ACTIVE | + DROP_RESET_SEQNO | /* cleanup */ DROP_ACTIVE | DROP_RETIRE | DROP_IDLE | DROP_FREED); }