From patchwork Tue May 26 13:25:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11570535 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 F25AB14C0 for ; Tue, 26 May 2020 13:26:00 +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 DADDF207CB for ; Tue, 26 May 2020 13:26:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DADDF207CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk 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 CF2436E1BB; Tue, 26 May 2020 13:25:58 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 018B26E1BB; Tue, 26 May 2020 13:25:57 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 21297534-1500050 for multiple; Tue, 26 May 2020 14:25:49 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Tue, 26 May 2020 14:25:48 +0100 Message-Id: <20200526132548.76656-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.27.0.rc0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib/i915: Restore hangcheck modparams between tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 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, Chris Wilson Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The hangcheck/reset modparam has far reaching effects and disables functionality if switch off. This can surprise a few tests causing them to skip. References: https://gitlab.freedesktop.org/drm/intel/-/issues/1929 Signed-off-by: Chris Wilson --- lib/i915/gem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/i915/gem.c b/lib/i915/gem.c index 3ef31ed33..45db8a0fd 100644 --- a/lib/i915/gem.c +++ b/lib/i915/gem.c @@ -130,6 +130,13 @@ static void reset_device(int i915) close(dir); } +static void restore_params(int i915) +{ + /* Re-enable modparams if left clobbered */ + igt_params_set(i915, "reset", "%u", -1); + igt_params_set(i915, "enable_hangcheck", "%u", 1); +} + void igt_require_gem(int i915) { int err; @@ -150,6 +157,7 @@ void igt_require_gem(int i915) * sequences of batches. */ reset_device(i915); + restore_params(i915); restore_defaults(i915); err = 0;