From patchwork Tue Apr 25 22:32:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 9699907 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 AB5B1601D3 for ; Tue, 25 Apr 2017 22:33:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3C39284EE for ; Tue, 25 Apr 2017 22:33:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9754C2857F; Tue, 25 Apr 2017 22:33:27 +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 5702F284EE for ; Tue, 25 Apr 2017 22:33:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69BD96E5D9; Tue, 25 Apr 2017 22:33:11 +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 4EEEB6E0F4 for ; Tue, 25 Apr 2017 22:33:08 +0000 (UTC) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 25 Apr 2017 15:33:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,251,1488873600"; d="scan'208";a="93786948" Received: from ezarza-mobl5.amr.corp.intel.com (HELO delly.amr.corp.intel.com) ([10.254.68.206]) by fmsmga005.fm.intel.com with ESMTP; 25 Apr 2017 15:33:07 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Tue, 25 Apr 2017 15:32:46 -0700 Message-Id: <20170425223301.23733-15-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170425223301.23733-1-lionel.g.landwerlin@intel.com> References: <20170425223301.23733-1-lionel.g.landwerlin@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 14/29] igt/perf: s/test_perf_ctx_mi_rpc/hsw_test_single_ctx_counters/ 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 From: Robert Bragg Signed-off-by: Robert Bragg Reviewed-by: Lionel Landwerlin --- tests/perf.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/perf.c b/tests/perf.c index c8092eaa..62bfd80f 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -2177,9 +2177,15 @@ emit_stall_timestamp_and_rpc(struct intel_batchbuffer *batch, * should be able to configure the OA unit for per-context metrics (for a * context associated with that process' drm file descriptor) and the counters * should only relate to that specific context. + * + * Unfortunately only Haswell limits the progression of OA counters for a + * single context and so this unit test is Haswell specific. For Gen8+ although + * reports read via i915 perf can be filtered for a single context the counters + * themselves always progress as global/system-wide counters affected by all + * contexts. */ static void -test_per_ctx_mi_rpc(void) +hsw_test_single_ctx_counters(void) { uint64_t properties[] = { DRM_I915_PERF_PROP_CTX_HANDLE, UINT64_MAX, /* updated below */ @@ -2638,8 +2644,16 @@ igt_main igt_subtest("mi-rpc") test_mi_rpc(); - igt_subtest("mi-rpc-per-ctx") - test_per_ctx_mi_rpc(); + igt_subtest("unprivileged-singled-ctx-counters") { + /* For Gen8+ the OA unit can no longer be made to clock gate + * for a specific context. Additionally the partial-replacement + * functionality to HW filter timer reports for a specific + * context (SKL+) can't stop multiple applications viewing + * system-wide data via MI_REPORT_PERF_COUNT commands. + */ + igt_require(IS_HASWELL(devid)); + hsw_test_single_ctx_counters(); + } igt_subtest("rc6-disable") test_rc6_disable();