From patchwork Fri Feb 15 11:46:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10815083 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 0F07B1575 for ; Fri, 15 Feb 2019 14:58:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3AEA2F8ED for ; Fri, 15 Feb 2019 14:58:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7AF22F8F7; Fri, 15 Feb 2019 14:58:45 +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 9DD452F8ED for ; Fri, 15 Feb 2019 14:58:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9440B6EC89; Fri, 15 Feb 2019 14:56: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 B0B9C6E09E; Fri, 15 Feb 2019 11:47:01 +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 15586839-1500050 for multiple; Fri, 15 Feb 2019 11:46:48 +0000 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Fri, 15 Feb 2019 11:46:47 +0000 Message-Id: <20190215114647.7058-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib: Restore the i915.reset modparam before cleaning up 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, Mika Kuoppala Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP We force a reset on test exit so that we can rapidly cleanup after a naughty test, it is not unknown for us to leave a queue of hanging batches around. However, if we have also fiddled with the i915.reset parameter in the meantime, this can leave the kernel unable to fulfil our request (and those naughty batches continue to disrupt testing). Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Petri Latvala --- lib/drmtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index 1964795a6..6c0a0e381 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -54,6 +54,7 @@ #include "igt_device.h" #include "igt_gt.h" #include "igt_kmod.h" +#include "igt_sysfs.h" #include "version.h" #include "config.h" #include "intel_reg.h" @@ -345,6 +346,7 @@ static void __cancel_work_at_exit(int fd) { igt_terminate_spin_batches(); /* for older kernels */ + igt_sysfs_set_parameter(fd, "reset", "%x", -1u /* any method */); igt_drop_caches_set(fd, /* cancel everything */ DROP_RESET_ACTIVE | DROP_RESET_SEQNO |