Skip to contentSkip to conversation

test/perf: Add support for TGL in perf tests

PATCH In review Umesh Nerlige Ramappa 3 participants 7 messages Oct 14, 2019 – Oct 30, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/perf: Add support for TGL in perf tests

Add following changes to enable perf tests on TGL
- Support only a single OA format
- Add TGL metrics
- Update whitelist test case
- Cleanup mi-rpc test if it fails
- Skip unsupported test - gen8-unprivileged-single-ctx-counters

---
 tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 62 insertions(+), 23 deletions(-)
tests/perf.c +62 -23
index 5ad8b2db..c5fc6878 100644
@@ -159,6 +159,15 @@ static struct oa_format gen8_oa_formats[I915_OA_FORMAT_MAX] = {
 		.b_off = 32, .n_b = 8, },
 };
 
+static struct oa_format gen12_oa_formats[I915_OA_FORMAT_MAX] = {
+	[I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
+		"A32u40_A4u32_B8_C8", .size = 256,
+		.a40_high_off = 160, .a40_low_off = 16, .n_a40 = 32,
+		.a_off = 144, .n_a = 4, .first_a = 32,
+		.b_off = 192, .n_b = 8,
+		.c_off = 224, .n_c = 8, },
+};
+
 static bool hsw_undefined_a_counters[45] = {
 	[4] = true,
 	[6] = true,
@@ -206,7 +215,10 @@ get_oa_format(enum drm_i915_oa_format format)
 {
 	if (IS_HASWELL(devid))
 		return hsw_oa_formats[format];
-	return gen8_oa_formats[format];
+	else if (IS_GEN12(devid))
+		return gen12_oa_formats[format];
+	else
+		return gen8_oa_formats[format];
 }
 
 static void
@@ -945,6 +957,8 @@ init_sys_info(void)
 			test_set_uuid = "db41edd4-d8e7-4730-ad11-b9a2d6833503";
 		} else if (IS_ICELAKE(devid)) {
 			test_set_uuid = "a291665e-244b-4b76-9b9a-01de9d3c8068";
+		} else if (IS_TIGERLAKE(devid)) {
+			test_set_uuid = "80a833f0-2504-4321-8894-e9277844ce7b";
 		} else {
 			igt_debug("unsupported GT\n");
 			return false;
@@ -2813,6 +2827,7 @@ test_mi_rpc(void)
 	drm_intel_bo *bo;
 	uint32_t *report32;
 	int ret;
+	uint32_t word0, word1, word63, word64;
 
 	stream_fd = __perf_open(drm_fd, &param, false);
 
@@ -2842,18 +2857,26 @@ test_mi_rpc(void)
 	igt_assert_eq(ret, 0);
 
 	report32 = bo->virtual;
-	igt_assert_eq(report32[0], 0xdeadbeef); /* report ID */
-	igt_assert_neq(report32[1], 0); /* timestamp */
-
-	igt_assert_neq(report32[63], 0x80808080); /* end of report */
-	igt_assert_eq(report32[64], 0x80808080); /* after 256 byte report */
+	word0 = report32[0];
+	word1 = report32[1];
+	word63 = report32[63];
+	word64 = report32[64];
 
+	/* cleanup before you fail for any sanity checks so that subsequent 
+	 * tests do not fail because of bad perf state.
+	 */
 	drm_intel_bo_unmap(bo);
 	drm_intel_bo_unreference(bo);
 	intel_batchbuffer_free(batch);
 	drm_intel_gem_context_destroy(context);
 	drm_intel_bufmgr_destroy(bufmgr);
 	__perf_close(stream_fd);
+
+	igt_assert_eq(word0, 0xdeadbeef); /* report ID */
+	igt_assert_neq(word1, 0); /* timestamp */
+
+	igt_assert_neq(word63, 0x80808080); /* end of report */
+	igt_assert_eq(word64, 0x80808080); /* after 256 byte report */
 }
 
 static void
@@ -3846,6 +3869,8 @@ test_whitelisted_registers_userspace_config(void)
 	uint32_t b_counters_regs[200];
 	uint32_t flex_regs[200];
 	uint32_t i;
+	uint32_t oa_start_trig1, oa_start_trig8;
+	uint32_t oa_report_trig1, oa_report_trig8;
 	uint64_t config_id;
 	char path[512];
 	int ret;
@@ -3869,14 +3894,26 @@ test_whitelisted_registers_userspace_config(void)
 	memset(&config, 0, sizeof(config));
 	memcpy(config.uuid, uuid, sizeof(config.uuid));
 
+	if (intel_gen(devid) >= 12) {
+		oa_start_trig1 = 0xd900;
+		oa_start_trig8 = 0xd91c;
+		oa_report_trig1 = 0xd920;
+		oa_report_trig8 = 0xd93c;
+	} else {
+		oa_start_trig1 = 0x2710;
+		oa_start_trig8 = 0x272c;
+		oa_report_trig1 = 0x2740;
+		oa_report_trig8 = 0x275c;
+	}
+
 	/* OASTARTTRIG[1-8] */
-	for (i = 0x2710; i <= 0x272c; i += 4) {
+	for (i = oa_start_trig1; i <= oa_start_trig8; i += 4) {
 		b_counters_regs[config.n_boolean_regs * 2] = i;
 		b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
 		config.n_boolean_regs++;
 	}
 	/* OAREPORTTRIG[1-8] */
-	for (i = 0x2740; i <= 0x275c; i += 4) {
+	for (i = oa_report_trig1; i <= oa_report_trig8; i += 4) {
 		b_counters_regs[config.n_boolean_regs * 2] = i;
 		b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
 		config.n_boolean_regs++;
@@ -3896,10 +3933,6 @@ test_whitelisted_registers_userspace_config(void)
 	/* Mux registers (too many of them, just checking bounds) */
 	i = 0;
 
-	/* NOA_WRITE */
-	mux_regs[i++] = 0x9800;
-	mux_regs[i++] = 0;
-
 	if (IS_HASWELL(devid)) {
 		/* Haswell specific. undocumented... */
 		mux_regs[i++] = 0x9ec0;
@@ -3922,10 +3955,6 @@ test_whitelisted_registers_userspace_config(void)
 		mux_regs[i++] = 0;
 	}
 
-	/* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
-	mux_regs[i++] = 0xE180;
-	mux_regs[i++] = 0;
-
 	if (IS_CHERRYVIEW(devid)) {
 		/* Cherryview specific. undocumented... */
 		mux_regs[i++] = 0x182300;
@@ -3934,12 +3963,20 @@ test_whitelisted_registers_userspace_config(void)
 		mux_regs[i++] = 0;
 	}
 
-	/* PERFCNT[12] */
-	mux_regs[i++] = 0x91B8;
-	mux_regs[i++] = 0;
-	/* PERFMATRIX */
-	mux_regs[i++] = 0x91C8;
-	mux_regs[i++] = 0;
+	if (intel_gen(devid) <= 11) {
+		/* NOA_WRITE */
+		mux_regs[i++] = 0x9800;
+		mux_regs[i++] = 0;
+		/* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
+		mux_regs[i++] = 0xE180;
+		mux_regs[i++] = 0;
+		/* PERFCNT[12] */
+		mux_regs[i++] = 0x91B8;
+		mux_regs[i++] = 0;
+		/* PERFMATRIX */
+		mux_regs[i++] = 0x91C8;
+		mux_regs[i++] = 0;
+	}
 
 	config.mux_regs_ptr = (uintptr_t) mux_regs;
 	config.n_mux_regs = i / 2;
@@ -4170,8 +4207,10 @@ igt_main
 		 * 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.
+		 *
+		 * For gen12 implement a separate test that uses only OAR
 		 */
-		igt_require(intel_gen(devid) >= 8);
+		igt_require(intel_gen(devid) >= 8 && intel_gen(devid) < 12);
 		gen8_test_single_ctx_render_target_writes_a_counter();
 	}
 
Signature · 6 lines
2.23.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for test/perf: Add support for TGL in perf tests

== Series Details ==

== Series Details ==

Series: test/perf: Add support for TGL in perf tests
URL : https://patchwork.freedesktop.org/series/67988/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7089 -> IGTPW_3572
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/index.html

Known issues
------------

Here are the changes found in IGTPW_3572 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850: [PASS][1] -> [INCOMPLETE][2] ([fdo#107718])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/fi-blb-e6850/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-blb-e6850/igt@[email protected]

* igt@gem_mmap_gtt@basic-write-read-distinct:
- fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([fdo#107724]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-icl-u3/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_switch@legacy-render:
- {fi-icl-guc}: [INCOMPLETE][5] ([fdo#107713] / [fdo#111381]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/fi-icl-guc/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-icl-guc/igt@[email protected]

* igt@gem_ctx_switch@rcs0:
- {fi-cml-s}: [INCOMPLETE][7] ([fdo#110566]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/fi-cml-s/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-cml-s/igt@[email protected]

* igt@prime_self_import@basic-with_two_bos:
- fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/fi-icl-u3/igt@prime_self_import@basic-with_two_bos.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-icl-u3/igt@prime_self_import@basic-with_two_bos.html

#### Warnings ####

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][11] ([fdo#111045] / [fdo#111096]) -> [FAIL][12] ([fdo#111407])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/fi-kbl-7500u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-kbl-7500u/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#110566]: https://bugs.freedesktop.org/show_bug.cgi?id=110566
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111600]: https://bugs.freedesktop.org/show_bug.cgi?id=111600
[fdo#111831]: https://bugs.freedesktop.org/show_bug.cgi?id=111831

Participating hosts (52 -> 46)
------------------------------

Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_5225 -> IGTPW_3572

CI-20190529: 20190529
CI_DRM_7089: f62c6f956e3237ae9262027b542af17ea588f5c3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3572: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/index.html
IGT_5225: 991ce4eede1c52f76378aebf162a13c20d6f6293 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for test/perf: Add support for TGL in perf tests

In reply to Umesh Nerlige Ramappa
== Series Details ==

== Series Details ==

Series: test/perf: Add support for TGL in perf tests
URL : https://patchwork.freedesktop.org/series/67988/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7089_full -> IGTPW_3572_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_3572_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_3572_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_3572_full:

### IGT changes ###

#### Possible regressions ####

* igt@i915_pm_rpm@system-suspend-modeset:
- shard-iclb: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb2/igt@[email protected]

Known issues
------------

Here are the changes found in IGTPW_3572_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_eio@unwedge-stress:
- shard-snb: [PASS][3] -> [FAIL][4] ([fdo#109661])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-snb4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb6/igt@[email protected]

* igt@gem_exec_balancer@smoke:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110854])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb6/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-bsd1:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +12 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb5/igt@[email protected]

* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#111325]) +7 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-glk: [PASS][11] -> [INCOMPLETE][12] ([fdo#103359] / [fdo#108686] / [k.org#198133])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-glk8/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk5/igt@[email protected]
- shard-hsw: [PASS][13] -> [INCOMPLETE][14] ([fdo#103540] / [fdo#108686])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-hsw6/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-hsw6/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-busy:
- shard-snb: [PASS][15] -> [DMESG-WARN][16] ([fdo#111870]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-snb2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb5/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-hsw: [PASS][17] -> [DMESG-WARN][18] ([fdo#111870])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-hsw1/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-hsw5/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-kbl: [PASS][19] -> [SKIP][20] ([fdo#109271])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl6/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl2/igt@[email protected]

* igt@kms_atomic_transition@plane-toggle-modeset-transition:
- shard-hsw: [PASS][21] -> [DMESG-WARN][22] ([fdo#102614])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-hsw4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-hsw5/igt@[email protected]

* igt@kms_color@pipe-c-degamma:
- shard-apl: [PASS][23] -> [FAIL][24] ([fdo#104782])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-apl1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl4/igt@[email protected]
- shard-glk: [PASS][25] -> [FAIL][26] ([fdo#104782])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-glk1/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk2/igt@[email protected]
- shard-kbl: [PASS][27] -> [FAIL][28] ([fdo#104782])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl6/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque:
- shard-apl: [PASS][29] -> [FAIL][30] ([fdo#103232])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-apl6/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl4/igt@[email protected]
- shard-kbl: [PASS][31] -> [FAIL][32] ([fdo#103232])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl3/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl: [PASS][33] -> [DMESG-WARN][34] ([fdo#108566]) +3 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-apl5/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl7/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: [PASS][35] -> [FAIL][36] ([fdo#105363])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-glk3/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk6/igt@[email protected]

* igt@kms_flip@modeset-vs-vblank-race-interruptible:
- shard-glk: [PASS][37] -> [FAIL][38] ([fdo#111609])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-glk2/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk5/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt:
- shard-iclb: [PASS][39] -> [FAIL][40] ([fdo#103167]) +6 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-render:
- shard-glk: [PASS][41] -> [FAIL][42] ([fdo#103167])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-glk3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-render.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-render.html

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-kbl: [PASS][43] -> [INCOMPLETE][44] ([fdo#103665])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl6/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-iclb: [PASS][45] -> [FAIL][46] ([fdo#103166])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb7/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb7/igt@[email protected]

* igt@kms_psr@psr2_sprite_render:
- shard-iclb: [PASS][47] -> [SKIP][48] ([fdo#109441]) +3 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb2/igt@kms_psr@psr2_sprite_render.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb6/igt@kms_psr@psr2_sprite_render.html

* igt@kms_setmode@basic:
- shard-apl: [PASS][49] -> [FAIL][50] ([fdo#99912])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-apl7/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl5/igt@[email protected]

* igt@perf_pmu@busy-idle-no-semaphores-bcs0:
- shard-apl: [PASS][51] -> [DMESG-WARN][52] ([fdo#111626])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-apl8/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl6/igt@[email protected]

#### Possible fixes ####

* igt@gem_eio@in-flight-contexts-immediate:
- shard-snb: [FAIL][53] ([fdo#111925]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-snb4/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb7/igt@[email protected]

* igt@gem_eio@in-flight-suspend:
- shard-iclb: [DMESG-WARN][55] ([fdo#111764]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb4/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [SKIP][57] ([fdo#111325]) -> [PASS][58] +3 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb1/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb7/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-kbl: [INCOMPLETE][59] ([fdo#103665] / [fdo#108686]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl6/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl6/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [DMESG-WARN][61] ([fdo#111870]) -> [PASS][62] +2 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-snb6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb2/igt@[email protected]
- shard-hsw: [DMESG-WARN][63] ([fdo#111870]) -> [PASS][64] +4 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-hsw8/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-hsw7/igt@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [DMESG-WARN][65] ([fdo#108566]) -> [PASS][66] +5 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-apl6/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl3/igt@[email protected]

* {igt@i915_pm_dc@dc6-dpms}:
- shard-iclb: [FAIL][67] ([fdo#110548]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb3/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-snb: [SKIP][69] ([fdo#109271]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-snb7/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb1/igt@[email protected]

* igt@i915_pm_rpm@modeset-non-lpsp-stress:
- shard-kbl: [DMESG-WARN][71] ([fdo#103313]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl2/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl6/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-64x64-random:
- shard-apl: [INCOMPLETE][73] ([fdo#103927]) -> [PASS][74] +1 similar issue
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-apl3/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl3/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-kbl: [FAIL][75] ([fdo#103375]) -> [PASS][76] +2 similar issues
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl1/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl2/igt@[email protected]

* igt@kms_flip@modeset-vs-vblank-race:
- shard-glk: [FAIL][77] ([fdo#111609]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-glk1/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-move:
- shard-glk: [FAIL][79] ([fdo#103167]) -> [PASS][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-glk6/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-pwrite:
- shard-iclb: [FAIL][81] ([fdo#103167]) -> [PASS][82] +7 similar issues
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-pwrite.html
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-pwrite.html

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][83] ([fdo#103166]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb4/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb3/igt@[email protected]

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][85] ([fdo#109441]) -> [PASS][86] +2 similar issues
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb1/igt@kms_psr@psr2_primary_page_flip.html
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [SKIP][87] ([fdo#109276]) -> [PASS][88] +17 similar issues
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb3/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@[email protected]

#### Warnings ####

* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [SKIP][89] ([fdo#109276]) -> [FAIL][90] ([fdo#111329])
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb5/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@[email protected]

* igt@gem_mocs_settings@mocs-isolation-bsd2:
- shard-iclb: [FAIL][91] ([fdo#111330]) -> [SKIP][92] ([fdo#109276])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb2/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb3/igt@[email protected]

* igt@gem_mocs_settings@mocs-settings-bsd2:
- shard-iclb: [SKIP][93] ([fdo#109276]) -> [FAIL][94] ([fdo#111330])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb6/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb4/igt@[email protected]

* igt@runner@aborted:
- shard-iclb: [FAIL][95] ([fdo#111093]) -> ([FAIL][96], [FAIL][97]) ([fdo#108654] / [fdo#111093])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-iclb4/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb4/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb2/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103313]: https://bugs.freedesktop.org/show_bug.cgi?id=103313
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108654]: https://bugs.freedesktop.org/show_bug.cgi?id=108654
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
[fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111093]: https://bugs.freedesktop.org/show_bug.cgi?id=111093
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111609]: https://bugs.freedesktop.org/show_bug.cgi?id=111609

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw
In reply to Umesh Nerlige Ramappa
Quoted 80 lines · Umesh Nerlige Ramappa

Add following changes to enable perf tests on TGL
- Support only a single OA format
- Add TGL metrics
- Update whitelist test case
- Cleanup mi-rpc test if it fails
- Skip unsupported test - gen8-unprivileged-single-ctx-counters

---
  tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------
  1 file changed, 62 insertions(+), 23 deletions(-)
tests/perf.c +23 -6
index 5ad8b2db..c5fc6878 100644
@@ -159,6 +159,15 @@ static struct oa_format gen8_oa_formats[I915_OA_FORMAT_MAX] = {
  		.b_off = 32, .n_b = 8, },
  };
 
+static struct oa_format gen12_oa_formats[I915_OA_FORMAT_MAX] = {
+	[I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
+		"A32u40_A4u32_B8_C8", .size = 256,
+		.a40_high_off = 160, .a40_low_off = 16, .n_a40 = 32,
+		.a_off = 144, .n_a = 4, .first_a = 32,
+		.b_off = 192, .n_b = 8,
+		.c_off = 224, .n_c = 8, },
+};
+
  static bool hsw_undefined_a_counters[45] = {
  	[4] = true,
  	[6] = true,
@@ -206,7 +215,10 @@ get_oa_format(enum drm_i915_oa_format format)
  {
  	if (IS_HASWELL(devid))
  		return hsw_oa_formats[format];
-	return gen8_oa_formats[format];
+	else if (IS_GEN12(devid))
+		return gen12_oa_formats[format];
+	else
+		return gen8_oa_formats[format];
  }
 
  static void
@@ -945,6 +957,8 @@ init_sys_info(void)
  			test_set_uuid = "db41edd4-d8e7-4730-ad11-b9a2d6833503";
  		} else if (IS_ICELAKE(devid)) {
  			test_set_uuid = "a291665e-244b-4b76-9b9a-01de9d3c8068";
+		} else if (IS_TIGERLAKE(devid)) {
+			test_set_uuid = "80a833f0-2504-4321-8894-e9277844ce7b";
  		} else {
  			igt_debug("unsupported GT\n");
  			return false;
@@ -2813,6 +2827,7 @@ test_mi_rpc(void)
  	drm_intel_bo *bo;
  	uint32_t *report32;
  	int ret;
+	uint32_t word0, word1, word63, word64;
 
  	stream_fd = __perf_open(drm_fd, &param, false);
 
@@ -2842,18 +2857,26 @@ test_mi_rpc(void)
  	igt_assert_eq(ret, 0);
 
  	report32 = bo->virtual;
-	igt_assert_eq(report32[0], 0xdeadbeef); /* report ID */
-	igt_assert_neq(report32[1], 0); /* timestamp */
-
-	igt_assert_neq(report32[63], 0x80808080); /* end of report */
-	igt_assert_eq(report32[64], 0x80808080); /* after 256 byte report */
+	word0 = report32[0];
+	word1 = report32[1];
+	word63 = report32[63];
+	word64 = report32[64];
 
+	/* cleanup before you fail for any sanity checks so that subsequent
+	 * tests do not fail because of bad perf state.
+	 */
  	drm_intel_bo_unmap(bo);
  	drm_intel_bo_unreference(bo);

tests/perf.c test_mi_rpc(void) · line 2879

Quoted 10 lines
tests/perf.c +6 -0
  	intel_batchbuffer_free(batch);
  	drm_intel_gem_context_destroy(context);
  	drm_intel_bufmgr_destroy(bufmgr);
  	__perf_close(stream_fd);
+
+	igt_assert_eq(word0, 0xdeadbeef); /* report ID */
+	igt_assert_neq(word1, 0); /* timestamp */
+
+	igt_assert_neq(word63, 0x80808080); /* end of report */
+	igt_assert_eq(word64, 0x80808080); /* after 256 byte report */

Any reason for this change? I can't see any functional change.

Quoted 91 lines
tests/perf.c +30 -16
  }
 
  static void
@@ -3846,6 +3869,8 @@ test_whitelisted_registers_userspace_config(void)
  	uint32_t b_counters_regs[200];
  	uint32_t flex_regs[200];
  	uint32_t i;
+	uint32_t oa_start_trig1, oa_start_trig8;
+	uint32_t oa_report_trig1, oa_report_trig8;
  	uint64_t config_id;
  	char path[512];
  	int ret;
@@ -3869,14 +3894,26 @@ test_whitelisted_registers_userspace_config(void)
  	memset(&config, 0, sizeof(config));
  	memcpy(config.uuid, uuid, sizeof(config.uuid));
 
+	if (intel_gen(devid) >= 12) {
+		oa_start_trig1 = 0xd900;
+		oa_start_trig8 = 0xd91c;
+		oa_report_trig1 = 0xd920;
+		oa_report_trig8 = 0xd93c;
+	} else {
+		oa_start_trig1 = 0x2710;
+		oa_start_trig8 = 0x272c;
+		oa_report_trig1 = 0x2740;
+		oa_report_trig8 = 0x275c;
+	}
+
  	/* OASTARTTRIG[1-8] */
-	for (i = 0x2710; i <= 0x272c; i += 4) {
+	for (i = oa_start_trig1; i <= oa_start_trig8; i += 4) {
  		b_counters_regs[config.n_boolean_regs * 2] = i;
  		b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
  		config.n_boolean_regs++;
  	}
  	/* OAREPORTTRIG[1-8] */
-	for (i = 0x2740; i <= 0x275c; i += 4) {
+	for (i = oa_report_trig1; i <= oa_report_trig8; i += 4) {
  		b_counters_regs[config.n_boolean_regs * 2] = i;
  		b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
  		config.n_boolean_regs++;
@@ -3896,10 +3933,6 @@ test_whitelisted_registers_userspace_config(void)
  	/* Mux registers (too many of them, just checking bounds) */
  	i = 0;
 
-	/* NOA_WRITE */
-	mux_regs[i++] = 0x9800;
-	mux_regs[i++] = 0;
-
  	if (IS_HASWELL(devid)) {
  		/* Haswell specific. undocumented... */
  		mux_regs[i++] = 0x9ec0;
@@ -3922,10 +3955,6 @@ test_whitelisted_registers_userspace_config(void)
  		mux_regs[i++] = 0;
  	}
 
-	/* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
-	mux_regs[i++] = 0xE180;
-	mux_regs[i++] = 0;
-
  	if (IS_CHERRYVIEW(devid)) {
  		/* Cherryview specific. undocumented... */
  		mux_regs[i++] = 0x182300;
@@ -3934,12 +3963,20 @@ test_whitelisted_registers_userspace_config(void)
  		mux_regs[i++] = 0;
  	}
 
-	/* PERFCNT[12] */
-	mux_regs[i++] = 0x91B8;
-	mux_regs[i++] = 0;
-	/* PERFMATRIX */
-	mux_regs[i++] = 0x91C8;
-	mux_regs[i++] = 0;
+	if (intel_gen(devid) <= 11) {
+		/* NOA_WRITE */
+		mux_regs[i++] = 0x9800;
+		mux_regs[i++] = 0;
+		/* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
+		mux_regs[i++] = 0xE180;
+		mux_regs[i++] = 0;
+		/* PERFCNT[12] */
+		mux_regs[i++] = 0x91B8;
+		mux_regs[i++] = 0;
+		/* PERFMATRIX */
+		mux_regs[i++] = 0x91C8;
+		mux_regs[i++] = 0;
+	}
 
  	config.mux_regs_ptr = (uintptr_t) mux_regs;
  	config.n_mux_regs = i / 2;

tests/perf.c igt_main · line 4211

Quoted 5 lines
tests/perf.c +2 -0
@@ -4170,8 +4207,10 @@ igt_main
  		 * 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.
+		 *
+		 * For gen12 implement a separate test that uses only OAR

Where is that test? :)

-Lionel

tests/perf.c igt_main · line 4216

Quoted 6 lines
tests/perf.c +1 -1
  		 */
-		igt_require(intel_gen(devid) >= 8);
+		igt_require(intel_gen(devid) >= 8 && intel_gen(devid) < 12);
  		gen8_test_single_ctx_render_target_writes_a_counter();
  	}
 

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw
Quoted 80 lines · Lionel Landwerlin
Quoted 79 lines · Umesh Nerlige Ramappa

Add following changes to enable perf tests on TGL
- Support only a single OA format
- Add TGL metrics
- Update whitelist test case
- Cleanup mi-rpc test if it fails
- Skip unsupported test - gen8-unprivileged-single-ctx-counters

---
 tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 62 insertions(+), 23 deletions(-)
tests/perf.c +24 -6
index 5ad8b2db..c5fc6878 100644
@@ -159,6 +159,15 @@ static struct oa_format gen8_oa_formats[I915_OA_FORMAT_MAX] = {
 		.b_off = 32, .n_b = 8, },
 };
+static struct oa_format gen12_oa_formats[I915_OA_FORMAT_MAX] = {
+	[I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
+		"A32u40_A4u32_B8_C8", .size = 256,
+		.a40_high_off = 160, .a40_low_off = 16, .n_a40 = 32,
+		.a_off = 144, .n_a = 4, .first_a = 32,
+		.b_off = 192, .n_b = 8,
+		.c_off = 224, .n_c = 8, },
+};
+
 static bool hsw_undefined_a_counters[45] = {
 	[4] = true,
 	[6] = true,
@@ -206,7 +215,10 @@ get_oa_format(enum drm_i915_oa_format format)
 {
 	if (IS_HASWELL(devid))
 		return hsw_oa_formats[format];
-	return gen8_oa_formats[format];
+	else if (IS_GEN12(devid))
+		return gen12_oa_formats[format];
+	else
+		return gen8_oa_formats[format];
 }
 static void
@@ -945,6 +957,8 @@ init_sys_info(void)
 			test_set_uuid = "db41edd4-d8e7-4730-ad11-b9a2d6833503";
 		} else if (IS_ICELAKE(devid)) {
 			test_set_uuid = "a291665e-244b-4b76-9b9a-01de9d3c8068";
+		} else if (IS_TIGERLAKE(devid)) {
+			test_set_uuid = "80a833f0-2504-4321-8894-e9277844ce7b";
 		} else {
 			igt_debug("unsupported GT\n");
 			return false;
@@ -2813,6 +2827,7 @@ test_mi_rpc(void)
 	drm_intel_bo *bo;
 	uint32_t *report32;
 	int ret;
+	uint32_t word0, word1, word63, word64;
 	stream_fd = __perf_open(drm_fd, &param, false);
@@ -2842,18 +2857,26 @@ test_mi_rpc(void)
 	igt_assert_eq(ret, 0);
 	report32 = bo->virtual;
-	igt_assert_eq(report32[0], 0xdeadbeef); /* report ID */
-	igt_assert_neq(report32[1], 0); /* timestamp */
-
-	igt_assert_neq(report32[63], 0x80808080); /* end of report */
-	igt_assert_eq(report32[64], 0x80808080); /* after 256 byte report */
+	word0 = report32[0];
+	word1 = report32[1];
+	word63 = report32[63];
+	word64 = report32[64];
+	/* cleanup before you fail for any sanity checks so that subsequent
+	 * tests do not fail because of bad perf state.
+	 */
 	drm_intel_bo_unmap(bo);
 	drm_intel_bo_unreference(bo);
 	intel_batchbuffer_free(batch);
 	drm_intel_gem_context_destroy(context);
 	drm_intel_bufmgr_destroy(bufmgr);
 	__perf_close(stream_fd);
+
Quoted 8 lines

tests/perf.c test_mi_rpc(void) · line 2879

Quoted 5 lines
tests/perf.c +5 -0
+	igt_assert_eq(word0, 0xdeadbeef); /* report ID */
+	igt_assert_neq(word1, 0); /* timestamp */
+
+	igt_assert_neq(word63, 0x80808080); /* end of report */
+	igt_assert_eq(word64, 0x80808080); /* after 256 byte report */

Any reason for this change? I can't see any functional change.

When running the entire perf test suite, if this test fails/asserts, all subsequent tests fail too (because perf_close is not called on failure). To avoid that, I moved the checks to a later point (temporarily, the code might need additional cleanup).

Quoted 87 lines
Quoted 87 lines
tests/perf.c +30 -16
 }
 static void
@@ -3846,6 +3869,8 @@ test_whitelisted_registers_userspace_config(void)
 	uint32_t b_counters_regs[200];
 	uint32_t flex_regs[200];
 	uint32_t i;
+	uint32_t oa_start_trig1, oa_start_trig8;
+	uint32_t oa_report_trig1, oa_report_trig8;
 	uint64_t config_id;
 	char path[512];
 	int ret;
@@ -3869,14 +3894,26 @@ test_whitelisted_registers_userspace_config(void)
 	memset(&config, 0, sizeof(config));
 	memcpy(config.uuid, uuid, sizeof(config.uuid));
+	if (intel_gen(devid) >= 12) {
+		oa_start_trig1 = 0xd900;
+		oa_start_trig8 = 0xd91c;
+		oa_report_trig1 = 0xd920;
+		oa_report_trig8 = 0xd93c;
+	} else {
+		oa_start_trig1 = 0x2710;
+		oa_start_trig8 = 0x272c;
+		oa_report_trig1 = 0x2740;
+		oa_report_trig8 = 0x275c;
+	}
+
 	/* OASTARTTRIG[1-8] */
-	for (i = 0x2710; i <= 0x272c; i += 4) {
+	for (i = oa_start_trig1; i <= oa_start_trig8; i += 4) {
 		b_counters_regs[config.n_boolean_regs * 2] = i;
 		b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
 		config.n_boolean_regs++;
 	}
 	/* OAREPORTTRIG[1-8] */
-	for (i = 0x2740; i <= 0x275c; i += 4) {
+	for (i = oa_report_trig1; i <= oa_report_trig8; i += 4) {
 		b_counters_regs[config.n_boolean_regs * 2] = i;
 		b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
 		config.n_boolean_regs++;
@@ -3896,10 +3933,6 @@ test_whitelisted_registers_userspace_config(void)
 	/* Mux registers (too many of them, just checking bounds) */
 	i = 0;
-	/* NOA_WRITE */
-	mux_regs[i++] = 0x9800;
-	mux_regs[i++] = 0;
-
 	if (IS_HASWELL(devid)) {
 		/* Haswell specific. undocumented... */
 		mux_regs[i++] = 0x9ec0;
@@ -3922,10 +3955,6 @@ test_whitelisted_registers_userspace_config(void)
 		mux_regs[i++] = 0;
 	}
-	/* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
-	mux_regs[i++] = 0xE180;
-	mux_regs[i++] = 0;
-
 	if (IS_CHERRYVIEW(devid)) {
 		/* Cherryview specific. undocumented... */
 		mux_regs[i++] = 0x182300;
@@ -3934,12 +3963,20 @@ test_whitelisted_registers_userspace_config(void)
 		mux_regs[i++] = 0;
 	}
-	/* PERFCNT[12] */
-	mux_regs[i++] = 0x91B8;
-	mux_regs[i++] = 0;
-	/* PERFMATRIX */
-	mux_regs[i++] = 0x91C8;
-	mux_regs[i++] = 0;
+	if (intel_gen(devid) <= 11) {
+		/* NOA_WRITE */
+		mux_regs[i++] = 0x9800;
+		mux_regs[i++] = 0;
+		/* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
+		mux_regs[i++] = 0xE180;
+		mux_regs[i++] = 0;
+		/* PERFCNT[12] */
+		mux_regs[i++] = 0x91B8;
+		mux_regs[i++] = 0;
+		/* PERFMATRIX */
+		mux_regs[i++] = 0x91C8;
+		mux_regs[i++] = 0;
+	}
 	config.mux_regs_ptr = (uintptr_t) mux_regs;
 	config.n_mux_regs = i / 2;
@@ -4170,8 +4207,10 @@ igt_main
Quoted 8 lines

tests/perf.c igt_main · line 4211

Quoted 5 lines
tests/perf.c +2 -0
 		 * 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.
+		 *
+		 * For gen12 implement a separate test that uses only OAR

Where is that test? :)

:) wip. I gave it a shot - removed the code that collects samples from oa buffer in this test, but it asserts later trying to compare the counters accumulated. I need to debug that. I will post that in another series/patch.

Thanks,
Umesh

Quoted 12 lines

-Lionel

tests/perf.c igt_main · line 4215

Quoted 5 lines
tests/perf.c +1 -1
 		 */
-		igt_require(intel_gen(devid) >= 8);
+		igt_require(intel_gen(devid) >= 8 && intel_gen(devid) < 12);
 		gen8_test_single_ctx_render_target_writes_a_counter();
 	}

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw
Quoted 93 lines · Umesh Nerlige Ramappa
Quoted 83 lines · Lionel Landwerlin
Quoted 82 lines · Umesh Nerlige Ramappa

Add following changes to enable perf tests on TGL
- Support only a single OA format
- Add TGL metrics
- Update whitelist test case
- Cleanup mi-rpc test if it fails
- Skip unsupported test - gen8-unprivileged-single-ctx-counters

---
 tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------

 1 file changed, 62 insertions(+), 23 deletions(-)
tests/perf.c +13 -1
index 5ad8b2db..c5fc6878 100644
@@ -159,6 +159,15 @@ static struct oa_format 
 gen8_oa_formats[I915_OA_FORMAT_MAX] = {
          .b_off = 32, .n_b = 8, },
  };
+static struct oa_format gen12_oa_formats[I915_OA_FORMAT_MAX] = {
+    [I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
+        "A32u40_A4u32_B8_C8", .size = 256,
+        .a40_high_off = 160, .a40_low_off = 16, .n_a40 = 32,
+        .a_off = 144, .n_a = 4, .first_a = 32,
+        .b_off = 192, .n_b = 8,
+        .c_off = 224, .n_c = 8, },
+};
+
  static bool hsw_undefined_a_counters[45] = {
      [4] = true,
      [6] = true,
@@ -206,7 +215,10 @@ get_oa_format(enum drm_i915_oa_format format)
  {
      if (IS_HASWELL(devid))
          return hsw_oa_formats[format];
-    return gen8_oa_formats[format];
+    else if (IS_GEN12(devid))
+        return gen12_oa_formats[format];
+    else
+        return gen8_oa_formats[format];
  }

 static void

tests/perf.c +3 -5
@@ -945,6 +957,8 @@ init_sys_info(void)
              test_set_uuid = "db41edd4-d8e7-4730-ad11-b9a2d6833503";
          } else if (IS_ICELAKE(devid)) {
              test_set_uuid = "a291665e-244b-4b76-9b9a-01de9d3c8068";
+        } else if (IS_TIGERLAKE(devid)) {
+            test_set_uuid = "80a833f0-2504-4321-8894-e9277844ce7b";
          } else {
              igt_debug("unsupported GT\n");
              return false;
@@ -2813,6 +2827,7 @@ test_mi_rpc(void)
      drm_intel_bo *bo;
      uint32_t *report32;
      int ret;
+    uint32_t word0, word1, word63, word64;
      stream_fd = __perf_open(drm_fd, &param, false);
@@ -2842,18 +2857,26 @@ test_mi_rpc(void)
      igt_assert_eq(ret, 0);
      report32 = bo->virtual;
-    igt_assert_eq(report32[0], 0xdeadbeef); /* report ID */
-    igt_assert_neq(report32[1], 0); /* timestamp */
-
-    igt_assert_neq(report32[63], 0x80808080); /* end of report */
-    igt_assert_eq(report32[64], 0x80808080); /* after 256 byte 

report */
+    word0 = report32[0];
+    word1 = report32[1];
+    word63 = report32[63];
+    word64 = report32[64];
+    /* cleanup before you fail for any sanity checks so that subsequent
+     * tests do not fail because of bad perf state. +     */
     drm_intel_bo_unmap(bo); drm_intel_bo_unreference(bo); intel_batchbuffer_free(batch); drm_intel_gem_context_destroy(context); drm_intel_bufmgr_destroy(bufmgr); __perf_close(stream_fd);
+

Quoted 8 lines
Quoted 5 lines

+    igt_assert_eq(word0, 0xdeadbeef); /* report ID */
+    igt_assert_neq(word1, 0); /* timestamp */
+
+    igt_assert_neq(word63, 0x80808080); /* end of report */ +    igt_assert_eq(word64, 0x80808080); /* after 256 byte report */

Any reason for this change? I can't see any functional change.

Quoted 1 line

When running the entire perf test suite, if this test fails/asserts, all subsequent tests fail too (because perf_close is not called on failure).  To avoid that, I moved the checks to a later point (temporarily, the code might need additional cleanup).

That's strange, because __perf_open & __perf_close are supposed to deal with this.

Quoted 101 lines
Quoted 92 lines
Quoted 92 lines

 }
 static void

tests/perf.c +30 -16
@@ -3846,6 +3869,8 @@ test_whitelisted_registers_userspace_config(void)
      uint32_t b_counters_regs[200];
      uint32_t flex_regs[200];
      uint32_t i;
+    uint32_t oa_start_trig1, oa_start_trig8;
+    uint32_t oa_report_trig1, oa_report_trig8;
      uint64_t config_id;
      char path[512];
      int ret;
@@ -3869,14 +3894,26 @@ 
 test_whitelisted_registers_userspace_config(void)
      memset(&config, 0, sizeof(config));
      memcpy(config.uuid, uuid, sizeof(config.uuid));
+    if (intel_gen(devid) >= 12) {
+        oa_start_trig1 = 0xd900;
+        oa_start_trig8 = 0xd91c;
+        oa_report_trig1 = 0xd920;
+        oa_report_trig8 = 0xd93c;
+    } else {
+        oa_start_trig1 = 0x2710;
+        oa_start_trig8 = 0x272c;
+        oa_report_trig1 = 0x2740;
+        oa_report_trig8 = 0x275c;
+    }
+
      /* OASTARTTRIG[1-8] */
-    for (i = 0x2710; i <= 0x272c; i += 4) {
+    for (i = oa_start_trig1; i <= oa_start_trig8; i += 4) {
          b_counters_regs[config.n_boolean_regs * 2] = i;
          b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
          config.n_boolean_regs++;
      }
      /* OAREPORTTRIG[1-8] */
-    for (i = 0x2740; i <= 0x275c; i += 4) {
+    for (i = oa_report_trig1; i <= oa_report_trig8; i += 4) {
          b_counters_regs[config.n_boolean_regs * 2] = i;
          b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
          config.n_boolean_regs++;
@@ -3896,10 +3933,6 @@ 
 test_whitelisted_registers_userspace_config(void)
      /* Mux registers (too many of them, just checking bounds) */
      i = 0;
-    /* NOA_WRITE */
-    mux_regs[i++] = 0x9800;
-    mux_regs[i++] = 0;
-
      if (IS_HASWELL(devid)) {
          /* Haswell specific. undocumented... */
          mux_regs[i++] = 0x9ec0;
@@ -3922,10 +3955,6 @@ 
 test_whitelisted_registers_userspace_config(void)
          mux_regs[i++] = 0;
      }
-    /* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
-    mux_regs[i++] = 0xE180;
-    mux_regs[i++] = 0;
-
      if (IS_CHERRYVIEW(devid)) {
          /* Cherryview specific. undocumented... */
          mux_regs[i++] = 0x182300;
@@ -3934,12 +3963,20 @@ 
 test_whitelisted_registers_userspace_config(void)
          mux_regs[i++] = 0;
      }
-    /* PERFCNT[12] */
-    mux_regs[i++] = 0x91B8;
-    mux_regs[i++] = 0;
-    /* PERFMATRIX */
-    mux_regs[i++] = 0x91C8;
-    mux_regs[i++] = 0;
+    if (intel_gen(devid) <= 11) {
+        /* NOA_WRITE */
+        mux_regs[i++] = 0x9800;
+        mux_regs[i++] = 0;
+        /* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
+        mux_regs[i++] = 0xE180;
+        mux_regs[i++] = 0;
+        /* PERFCNT[12] */
+        mux_regs[i++] = 0x91B8;
+        mux_regs[i++] = 0;
+        /* PERFMATRIX */
+        mux_regs[i++] = 0x91C8;
+        mux_regs[i++] = 0;
+    }
      config.mux_regs_ptr = (uintptr_t) mux_regs;
      config.n_mux_regs = i / 2;
@@ -4170,8 +4207,10 @@ igt_main
Quoted 8 lines

tests/perf.c igt_main · line 4211

Quoted 5 lines
tests/perf.c +2 -0
           * 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.
+         *
+         * For gen12 implement a separate test that uses only OAR

Where is that test? :)

Quoted 4 lines

:) wip. I gave it a shot - removed the code that collects samples from oa buffer in this test, but it asserts later trying to compare the counters accumulated. I need to debug that. I will post that in another series/patch.

Thanks,
Umesh

Cool, I was looking forward to see a test that at least verifies the save/restore of the counters.

Pretty much all of the 3d pipeline counters (A counters) should not progress.

-Lionel

Quoted 6 lines
Quoted 6 lines

-Lionel

Quoted 8 lines
Quoted 7 lines

tests/perf.c igt_main · line 4215

Quoted 5 lines
tests/perf.c +1 -1
           */
-        igt_require(intel_gen(devid) >= 8);
+        igt_require(intel_gen(devid) >= 8 && intel_gen(devid) < 12);
 gen8_test_single_ctx_render_target_writes_a_counter();
      }

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#6 lore raw
Quoted 94 lines · Lionel Landwerlin
Quoted 93 lines · Umesh Nerlige Ramappa
Quoted 91 lines · Lionel Landwerlin
Quoted 81 lines · Umesh Nerlige Ramappa

Add following changes to enable perf tests on TGL
- Support only a single OA format
- Add TGL metrics
- Update whitelist test case
- Cleanup mi-rpc test if it fails
- Skip unsupported test - gen8-unprivileged-single-ctx-counters

---
 tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------

 1 file changed, 62 insertions(+), 23 deletions(-)
tests/perf.c +13 -1
index 5ad8b2db..c5fc6878 100644
@@ -159,6 +159,15 @@ static struct oa_format 
 gen8_oa_formats[I915_OA_FORMAT_MAX] = {
          .b_off = 32, .n_b = 8, },
  };
+static struct oa_format gen12_oa_formats[I915_OA_FORMAT_MAX] = {
+    [I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
+        "A32u40_A4u32_B8_C8", .size = 256,
+        .a40_high_off = 160, .a40_low_off = 16, .n_a40 = 32,
+        .a_off = 144, .n_a = 4, .first_a = 32,
+        .b_off = 192, .n_b = 8,
+        .c_off = 224, .n_c = 8, },
+};
+
  static bool hsw_undefined_a_counters[45] = {
      [4] = true,
      [6] = true,
@@ -206,7 +215,10 @@ get_oa_format(enum drm_i915_oa_format format)
  {
      if (IS_HASWELL(devid))
          return hsw_oa_formats[format];
-    return gen8_oa_formats[format];
+    else if (IS_GEN12(devid))
+        return gen12_oa_formats[format];
+    else
+        return gen8_oa_formats[format];
  }

 static void

tests/perf.c +3 -5
@@ -945,6 +957,8 @@ init_sys_info(void)
              test_set_uuid = "db41edd4-d8e7-4730-ad11-b9a2d6833503";
          } else if (IS_ICELAKE(devid)) {
              test_set_uuid = "a291665e-244b-4b76-9b9a-01de9d3c8068";
+        } else if (IS_TIGERLAKE(devid)) {
+            test_set_uuid = "80a833f0-2504-4321-8894-e9277844ce7b";
          } else {
              igt_debug("unsupported GT\n");
              return false;
@@ -2813,6 +2827,7 @@ test_mi_rpc(void)
      drm_intel_bo *bo;
      uint32_t *report32;
      int ret;
+    uint32_t word0, word1, word63, word64;
      stream_fd = __perf_open(drm_fd, &param, false);
@@ -2842,18 +2857,26 @@ test_mi_rpc(void)
      igt_assert_eq(ret, 0);
      report32 = bo->virtual;
-    igt_assert_eq(report32[0], 0xdeadbeef); /* report ID */
-    igt_assert_neq(report32[1], 0); /* timestamp */
-
-    igt_assert_neq(report32[63], 0x80808080); /* end of report */
-    igt_assert_eq(report32[64], 0x80808080); /* after 256 byte 

report */
+    word0 = report32[0];
+    word1 = report32[1];
+    word63 = report32[63];
+    word64 = report32[64];
+    /* cleanup before you fail for any sanity checks so that subsequent
+     * tests do not fail because of bad perf state. +     */
     drm_intel_bo_unmap(bo); drm_intel_bo_unreference(bo); intel_batchbuffer_free(batch); drm_intel_gem_context_destroy(context); drm_intel_bufmgr_destroy(bufmgr); __perf_close(stream_fd);

tests/perf.c test_mi_rpc(void) · line 2879

Quoted 6 lines
tests/perf.c +6 -0
+
+    igt_assert_eq(word0, 0xdeadbeef); /* report ID */
+    igt_assert_neq(word1, 0); /* timestamp */
+
+    igt_assert_neq(word63, 0x80808080); /* end of report */
+    igt_assert_eq(word64, 0x80808080); /* after 256 byte report */

Any reason for this change? I can't see any functional change.

Quoted 5 lines
Quoted 1 line

When running the entire perf test suite, if this test fails/asserts, all subsequent tests fail too (because perf_close is not called on failure).  To avoid that, I moved the checks to a later point (temporarily, the code might need additional cleanup).

That's strange, because __perf_open & __perf_close are supposed to deal with this.

True. Digging deeper, not all tests fail following mi-rpc. This is the current sequence of tests in non-hsw platforms that fails.

mi-rpc
gen8-unprivileged-single-ctx-counters

the latter test forks out a child and calls perf_open in the child process, so it tries to close the stream_fd from this child which will not work. Hence the perf_open fails.

Also note that gen8-unprivileged-single-ctx-counters itself forks out multiple childs if error is EAGAIN (say for delta_delta > 500). We may need to cleanup the stream_fds appropriately if such an error occurs (or maybe occured - https://bugs.freedesktop.org/show_bug.cgi?id=111821)

Anyways, I think I will back out the above change and post a new patch to fix a potential failure in gen8-unprivileged-single-ctx-counters.

Thanks,
Umesh

Quoted 108 lines
Quoted 102 lines
Quoted 93 lines
Quoted 93 lines

 }
 static void

tests/perf.c +30 -16
@@ -3846,6 +3869,8 @@ test_whitelisted_registers_userspace_config(void)
      uint32_t b_counters_regs[200];
      uint32_t flex_regs[200];
      uint32_t i;
+    uint32_t oa_start_trig1, oa_start_trig8;
+    uint32_t oa_report_trig1, oa_report_trig8;
      uint64_t config_id;
      char path[512];
      int ret;
@@ -3869,14 +3894,26 @@ 
 test_whitelisted_registers_userspace_config(void)
      memset(&config, 0, sizeof(config));
      memcpy(config.uuid, uuid, sizeof(config.uuid));
+    if (intel_gen(devid) >= 12) {
+        oa_start_trig1 = 0xd900;
+        oa_start_trig8 = 0xd91c;
+        oa_report_trig1 = 0xd920;
+        oa_report_trig8 = 0xd93c;
+    } else {
+        oa_start_trig1 = 0x2710;
+        oa_start_trig8 = 0x272c;
+        oa_report_trig1 = 0x2740;
+        oa_report_trig8 = 0x275c;
+    }
+
      /* OASTARTTRIG[1-8] */
-    for (i = 0x2710; i <= 0x272c; i += 4) {
+    for (i = oa_start_trig1; i <= oa_start_trig8; i += 4) {
          b_counters_regs[config.n_boolean_regs * 2] = i;
          b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
          config.n_boolean_regs++;
      }
      /* OAREPORTTRIG[1-8] */
-    for (i = 0x2740; i <= 0x275c; i += 4) {
+    for (i = oa_report_trig1; i <= oa_report_trig8; i += 4) {
          b_counters_regs[config.n_boolean_regs * 2] = i;
          b_counters_regs[config.n_boolean_regs * 2 + 1] = 0;
          config.n_boolean_regs++;
@@ -3896,10 +3933,6 @@ 
 test_whitelisted_registers_userspace_config(void)
      /* Mux registers (too many of them, just checking bounds) */
      i = 0;
-    /* NOA_WRITE */
-    mux_regs[i++] = 0x9800;
-    mux_regs[i++] = 0;
-
      if (IS_HASWELL(devid)) {
          /* Haswell specific. undocumented... */
          mux_regs[i++] = 0x9ec0;
@@ -3922,10 +3955,6 @@ 
 test_whitelisted_registers_userspace_config(void)
          mux_regs[i++] = 0;
      }
-    /* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
-    mux_regs[i++] = 0xE180;
-    mux_regs[i++] = 0;
-
      if (IS_CHERRYVIEW(devid)) {
          /* Cherryview specific. undocumented... */
          mux_regs[i++] = 0x182300;
@@ -3934,12 +3963,20 @@ 
 test_whitelisted_registers_userspace_config(void)
          mux_regs[i++] = 0;
      }
-    /* PERFCNT[12] */
-    mux_regs[i++] = 0x91B8;
-    mux_regs[i++] = 0;
-    /* PERFMATRIX */
-    mux_regs[i++] = 0x91C8;
-    mux_regs[i++] = 0;
+    if (intel_gen(devid) <= 11) {
+        /* NOA_WRITE */
+        mux_regs[i++] = 0x9800;
+        mux_regs[i++] = 0;
+        /* HALF_SLICE_CHICKEN2 (shared with kernel workaround) */
+        mux_regs[i++] = 0xE180;
+        mux_regs[i++] = 0;
+        /* PERFCNT[12] */
+        mux_regs[i++] = 0x91B8;
+        mux_regs[i++] = 0;
+        /* PERFMATRIX */
+        mux_regs[i++] = 0x91C8;
+        mux_regs[i++] = 0;
+    }
      config.mux_regs_ptr = (uintptr_t) mux_regs;
      config.n_mux_regs = i / 2;
@@ -4170,8 +4207,10 @@ igt_main
Quoted 8 lines

tests/perf.c igt_main · line 4211

Quoted 5 lines
tests/perf.c +2 -0
           * 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.
+         *
+         * For gen12 implement a separate test that uses only OAR

Where is that test? :)

Quoted 4 lines

:) wip. I gave it a shot - removed the code that collects samples from oa buffer in this test, but it asserts later trying to compare the counters accumulated. I need to debug that. I will post that in another series/patch.

Thanks,
Umesh

Quoted 23 lines

Cool, I was looking forward to see a test that at least verifies the save/restore of the counters.

Pretty much all of the 3d pipeline counters (A counters) should not progress.

-Lionel

Quoted 14 lines
Quoted 13 lines

-Lionel

Quoted 5 lines
tests/perf.c +1 -1
           */
-        igt_require(intel_gen(devid) >= 8);
+        igt_require(intel_gen(devid) >= 8 && intel_gen(devid) < 12);
 gen8_test_single_ctx_render_target_writes_a_counter();
      }

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev