From patchwork Thu Jun 27 12:25:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 11019611 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 310E913B4 for ; Thu, 27 Jun 2019 12:26:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2364228B02 for ; Thu, 27 Jun 2019 12:26:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1742A28B0B; Thu, 27 Jun 2019 12:26:00 +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,HK_RANDOM_FROM, 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 C40F72237D for ; Thu, 27 Jun 2019 12:25:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0862E6E184; Thu, 27 Jun 2019 12:25:59 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5013D6E184; Thu, 27 Jun 2019 12:25:57 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 05:25:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,423,1557212400"; d="scan'208";a="162619581" Received: from czwolak-mobl2.ger.corp.intel.com (HELO localhost.localdomain) ([10.252.4.8]) by fmsmga008.fm.intel.com with ESMTP; 27 Jun 2019 05:25:55 -0700 From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 27 Jun 2019 13:25:52 +0100 Message-Id: <20190627122552.10255-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib/i915: Use engine discovery in gem_test_engines 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: Intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin If request is to verify all engines work, use the new engine discovery API so we can actually test all. There is a sporadic and mysterious, possibly memory corruption issue surronding this area so lets see if this changes the pattern. It is easy to do in this function due it re-opening the driver and throwing it away. So there are no concerns that the modified default context can affect any other test. Signed-off-by: Tvrtko Ursulin References: https://bugzilla.freedesktop.org/show_bug.cgi?id=110667 Reviewed-by: Chris Wilson --- lib/i915/gem_submission.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c index 2fd460d5ed2b..a8bb45c6ac8f 100644 --- a/lib/i915/gem_submission.c +++ b/lib/i915/gem_submission.c @@ -28,6 +28,8 @@ #include +#include "i915/gem_engine_topology.h" + #include "igt_core.h" #include "igt_gt.h" #include "igt_sysfs.h" @@ -215,8 +217,10 @@ void gem_test_engine(int i915, unsigned int engine) gem_write(i915, obj.handle, 0, &bbe, sizeof(bbe)); if (engine == ALL_ENGINES) { - for_each_physical_engine(i915, engine) { - execbuf.flags = engine; + const struct intel_execution_engine2 *e2; + + __for_each_physical_engine(i915, e2) { + execbuf.flags = e2->flags; gem_execbuf(i915, &execbuf); } } else {