From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF25210E730 for ; Mon, 10 Oct 2022 21:42:17 +0000 (UTC) From: Umesh Nerlige Ramappa To: igt-dev@lists.freedesktop.org, Lionel G Landwerlin , Ashutosh Dixit Date: Mon, 10 Oct 2022 21:41:45 +0000 Message-Id: <20221010214215.5378-7-umesh.nerlige.ramappa@intel.com> In-Reply-To: <20221010214215.5378-1-umesh.nerlige.ramappa@intel.com> References: <20221010214215.5378-1-umesh.nerlige.ramappa@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v6 06/36] i915/perf: Define OA report types and fix oa-formats test List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: With newer gen12 platforms, formats used for OAG buffer and MI_REPORT_PERF_FORMAT differ slightly. This causes issues when the oa-formats test does a sanity check. Run oa-formats for OAG reports only. OAR formats must be tested with the gen12-mi-rpc and gen12-unprivileged-single-ctx-counters. v2: Clarify commit message Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin --- tests/i915/perf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/i915/perf.c b/tests/i915/perf.c index 5fe874c1..65434055 100644 --- a/tests/i915/perf.c +++ b/tests/i915/perf.c @@ -95,6 +95,13 @@ struct accumulator { uint64_t deltas[MAX_RAW_OA_COUNTERS]; }; +enum { + OAG, + OAR, + + MAX_OA_TYPE, +}; + struct oa_format { const char *name; size_t size; @@ -108,6 +115,7 @@ struct oa_format { int n_b; int c_off; int n_c; + int oa_type; }; static struct oa_format hsw_oa_formats[I915_OA_FORMAT_MAX] = { @@ -1483,6 +1491,9 @@ test_oa_formats(void) if (!format.name) /* sparse, indexed by ID */ continue; + if (format.oa_type != OAG) /* sparse, indexed by ID */ + continue; + igt_debug("Checking OA format %s\n", format.name); open_and_read_2_oa_reports(i, -- 2.25.1