From patchwork Wed Dec 4 13:20:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11272937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CCF356C1 for ; Wed, 4 Dec 2019 13:21:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B133820656 for ; Wed, 4 Dec 2019 13:21:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B133820656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 919886E8F9; Wed, 4 Dec 2019 13:21:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3ED4A6E8F3; Wed, 4 Dec 2019 13:21:03 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 19457107-1500050 for multiple; Wed, 04 Dec 2019 13:20:49 +0000 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 4 Dec 2019 13:20:51 +0000 Message-Id: <20191204132051.3740419-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] i915/perf_pmu: Measure how many batches can fit into the ring 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: igt-dev@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Do not blindly assume 30 spin batches will always fit into the ring, but use our measurement tool instead. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Stuart Summers --- tests/perf_pmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index de4c231dd..8e50ac9a0 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -42,6 +42,7 @@ #include "igt_perf.h" #include "igt_sysfs.h" #include "igt_pm.h" +#include "i915/gem_ring.h" #include "sw_sync.h" IGT_TEST_DESCRIPTION("Test the i915 pmu perf interface"); @@ -1276,8 +1277,9 @@ static void cpu_hotplug(int gem_fd) static void test_interrupts(int gem_fd) { + const int target = + gem_measure_ring_inflight(gem_fd, I915_EXEC_DEFAULT, 0); const unsigned int test_duration_ms = 1000; - const int target = 30; igt_spin_t *spin[target]; struct pollfd pfd; uint64_t idle, busy;