From patchwork Thu Mar 15 14:45:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 10284621 X-Patchwork-Delegate: geert@linux-m68k.org 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 2BCC060291 for ; Thu, 15 Mar 2018 14:46:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F63228AED for ; Thu, 15 Mar 2018 14:46:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13BA228AEF; Thu, 15 Mar 2018 14:46:16 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D2F428AF1 for ; Thu, 15 Mar 2018 14:46:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752572AbeCOOqM (ORCPT ); Thu, 15 Mar 2018 10:46:12 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33559 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752451AbeCOOqK (ORCPT ); Thu, 15 Mar 2018 10:46:10 -0400 Received: by mail-wm0-f65.google.com with SMTP id s206so23476884wme.0 for ; Thu, 15 Mar 2018 07:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=zuR34sX1gthTDLtNHdDjfsaNGqFMUdPoFUkWEw5ej6E=; b=C4TiW/tOX7JnahS9QSqdrnI/mL6uEoqfjs50+FxEL3wp3wFd0DUkxTFsmidDXzdDzi 1QAZfabOCWDpNY1cY/4meDhudvrI3Bvnk/Bm6LDSbCg3RgwuC/tbfbG5f5O3sdU6mLgt SDlzdn40tvYx7GDc7w/qZycrA+EmDJyueBl6xbSGPzHLpoAVveOdnXqrFsmDkSTYNqOZ PhceeDt8vBSjq5JfzCk3rEMrWzcokoChsGXv8mAgKfdcIju57l03pZgmpsRv68nJggBK Y5DVYY4Uhm28wIuugR5yaGg7sv3ZJSiUOaA7IWgKQwXmMp0KJrg6BSVuTWWINM6M+eUX wICg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=zuR34sX1gthTDLtNHdDjfsaNGqFMUdPoFUkWEw5ej6E=; b=Q05DlZlF+7+tZ1uhlVlYP6QO+HJqWTGXQhGXFr9EkecWm+B+n+CqdD6xwcO0r50T+M LxACE5A5CSQpkMzsSZ5W41VB014MQVk2Q+LsylFzxKmOrq1Cickq0YCjZgj/Q2TPsBwJ D1t1N0qJIlC5r6NRIYWedqrHzSbSofeG3j0G8LXOit8iSzB1zhx2OgO1k4dtoU7KuPe7 +ebJydXPN+DA5cb08X3cf/eG7j35JfdFnDwWBc4juaoHIIvPCDlJF9vuajUObY/ujPX/ wdJLGNs4JCK6GxSb5BbXIjx6sU6RUqfRK0x0y4RRcmi/8YdfdNj5PtpLjGSH3qh7K3zc oVQg== X-Gm-Message-State: AElRT7GM0qf/bffqbSqXaJVoJxOh322ilRNWhJ1Qzb2oClmqoOztl3Zs MiH+mDTYaMyLX5IDwpH0Tw== X-Google-Smtp-Source: AG47ELtAnbIHA58tAIvl2qpPYe/mTrDEdUuBGXV5egTaPlVk3NvwlIdGgehHu1Rnl7/GV/YDzeiZ8A== X-Received: by 10.28.12.14 with SMTP id 14mr4896534wmm.107.1521125169786; Thu, 15 Mar 2018 07:46:09 -0700 (PDT) Received: from groucho.site (ipbcc0ce2f.dynamic.kabel-deutschland.de. [188.192.206.47]) by smtp.gmail.com with ESMTPSA id m71sm4340486wmd.6.2018.03.15.07.46.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Mar 2018 07:46:09 -0700 (PDT) From: Ulrich Hecht To: intel-gfx@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org, laurent.pinchart@ideasonboard.com, Ulrich Hecht Subject: [PATCH igt 4/8] lib/igt_gt: check for presence of GPU reset before using it Date: Thu, 15 Mar 2018 15:45:40 +0100 Message-Id: <1521125144-28614-5-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521125144-28614-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1521125144-28614-1-git-send-email-ulrich.hecht+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes failed assertion on non-i915 devices. Signed-off-by: Ulrich Hecht --- lib/igt_gt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/igt_gt.c b/lib/igt_gt.c index 9cb07c2..825ea52 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -166,14 +166,15 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags) struct drm_i915_gem_context_param param; unsigned ban; + if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false)) + igt_require(has_gpu_reset(fd)); + igt_assert(igt_sysfs_set_parameter (fd, "reset", "%d", INT_MAX /* any reset method */)); if (!igt_check_boolean_env_var("IGT_HANG", true)) igt_skip("hang injection disabled by user"); gem_context_require_bannable(fd); - if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false)) - igt_require(has_gpu_reset(fd)); param.ctx_id = ctx; param.size = 0;