From patchwork Thu Dec 7 22:48:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Argenziano X-Patchwork-Id: 10101227 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 87EF060325 for ; Thu, 7 Dec 2017 22:58:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78EC528897 for ; Thu, 7 Dec 2017 22:58:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CA422889B; Thu, 7 Dec 2017 22:58:19 +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 4065D28897 for ; Thu, 7 Dec 2017 22:58:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E419B6E286; Thu, 7 Dec 2017 22:58:17 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 07FB56E286 for ; Thu, 7 Dec 2017 22:58:16 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Dec 2017 14:48:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,374,1508828400"; d="scan'208";a="182315506" Received: from relo-linux-2.fm.intel.com ([10.1.27.122]) by orsmga005.jf.intel.com with ESMTP; 07 Dec 2017 14:48:56 -0800 From: Antonio Argenziano To: intel-gfx@lists.freedesktop.org Date: Thu, 7 Dec 2017 14:48:23 -0800 Message-Id: <20171207224823.30052-5-antonio.argenziano@intel.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171207224823.30052-1-antonio.argenziano@intel.com> References: <20171207224823.30052-1-antonio.argenziano@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 5/5] igt_hang_ctx: Add preemptible parameter X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 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 This patch adds a parameter to make the hanging context conditionally pre-emptible. Cc: Chris Wilson Signed-off-by: Antonio Argenziano --- lib/igt_gt.c | 2 +- lib/igt_gt.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/igt_gt.c b/lib/igt_gt.c index 614fd83b..a36e5506 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -296,7 +296,7 @@ igt_hang_t igt_hang_ctx(int fd, igt_hang_opt_t opts) emit_recursive_batch(&spin, fd, (igt_spin_opt_t){ .ctx = opts.ctx, .engine = opts.ring, - .preemptible = false}); + .preemptible = opts.preemptible}); if (opts.offset) *opts.offset = spin.gtt_offset; diff --git a/lib/igt_gt.h b/lib/igt_gt.h index 3f3e2d96..17fcee33 100644 --- a/lib/igt_gt.h +++ b/lib/igt_gt.h @@ -42,6 +42,7 @@ typedef struct igt_hang_opt { int ring; unsigned flags; uint64_t *offset; + bool preemptible; } igt_hang_opt_t; igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags);