From patchwork Tue Oct 10 23:59:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinay Belgaumkar X-Patchwork-Id: 9998157 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 3B67760146 for ; Tue, 10 Oct 2017 23:57:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14882287D6 for ; Tue, 10 Oct 2017 23:57:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB003287DB; Tue, 10 Oct 2017 23:57:56 +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 83D19287D6 for ; Tue, 10 Oct 2017 23:57:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9561B6E5A9; Tue, 10 Oct 2017 23:57:55 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 206656E5A9 for ; Tue, 10 Oct 2017 23:57:53 +0000 (UTC) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2017 16:57:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,359,1503385200"; d="scan'208";a="161206300" Received: from vinaysim-desktop.fm.intel.com ([10.1.27.163]) by fmsmga005.fm.intel.com with ESMTP; 10 Oct 2017 16:57:53 -0700 From: Vinay Belgaumkar To: intel-gfx@lists.freedesktop.org Date: Tue, 10 Oct 2017 16:59:51 -0700 Message-Id: <1507679991-26908-1-git-send-email-vinay.belgaumkar@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH i-g-t] lib/igt_gt: Allow non-default contexts to hang non-render rings 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 limitation does not exist for gen8+. Cc: Michel Thierry Cc: Arkadiusz Hiler Cc: Petri Latvala Signed-off-by: Vinay Belgaumkar --- lib/igt_gt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/igt_gt.c b/lib/igt_gt.c index b3f3b38..abf789d 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -214,6 +214,7 @@ void igt_disallow_hang(int fd, igt_hang_t arg) * @ctx: the contxt specifier * @ring: execbuf ring flag * @flags: set of flags to control execution + * @offset: The resultant gtt offset of the exec obj * * This helper function injects a hanging batch associated with @ctx into @ring. * It returns a #igt_hang_t structure which must be passed to @@ -239,8 +240,11 @@ igt_hang_t igt_hang_ctx(int fd, igt_require_hang_ring(fd, ring); - /* One day the kernel ABI will be fixed! */ - igt_require(ctx == 0 || ring == I915_EXEC_RENDER); + if (!(intel_gen(intel_get_drm_devid(fd)) >= 8)) + { + /* One day the kernel ABI will be fixed! */ + igt_require(ctx == 0 || ring == I915_EXEC_RENDER); + } param.context = ctx; param.size = 0;