From patchwork Fri Mar 16 10:19:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 10286867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3483460386 for ; Fri, 16 Mar 2018 10:19:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2353728E0B for ; Fri, 16 Mar 2018 10:19:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1806828E15; Fri, 16 Mar 2018 10:19:58 +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=-4.2 required=2.0 tests=BAYES_00, 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 D4B1B28E14 for ; Fri, 16 Mar 2018 10:19:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4452B6EAB5; Fri, 16 Mar 2018 10:19:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id D4BED6EAB5 for ; Fri, 16 Mar 2018 10:19:38 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2018 03:19:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,315,1517904000"; d="scan'208";a="37969192" Received: from rosetta.fi.intel.com ([10.237.72.186]) by fmsmga004.fm.intel.com with ESMTP; 16 Mar 2018 03:19:36 -0700 Received: by rosetta.fi.intel.com (Postfix, from userid 1000) id 2822F84007F; Fri, 16 Mar 2018 12:19:25 +0200 (EET) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Fri, 16 Mar 2018 12:19:19 +0200 Message-Id: <20180316101919.25997-1-mika.kuoppala@linux.intel.com> X-Mailer: git-send-email 2.14.1 Subject: [Intel-gfx] [PATCH igt] tests/gem_eio: use lib to force a gpu 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: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Mika Kuoppala Instead of poking the debugfs directly, use a library function to force a gpu reset. Cc: Chris Wilson Signed-off-by: Mika Kuoppala --- tests/gem_eio.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/gem_eio.c b/tests/gem_eio.c index 249f5bff..1aa5d60a 100644 --- a/tests/gem_eio.c +++ b/tests/gem_eio.c @@ -84,15 +84,6 @@ static void wedge_gpu(int fd) igt_assert(i915_reset_control(true)); } -static void wedgeme(int drm_fd) -{ - int dir = igt_debugfs_dir(drm_fd); - - igt_sysfs_set(dir, "i915_wedged", "-1"); - - close(dir); -} - static int __gem_throttle(int fd) { int err = 0; @@ -181,7 +172,7 @@ static void test_suspend(int fd, int state) /* Check we can suspend when the driver is already wedged */ igt_require(i915_reset_control(false)); - wedgeme(fd); + igt_force_gpu_reset(fd); igt_system_suspend_autoresume(state, SUSPEND_TEST_DEVICES);