All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests
@ 2019-10-14 18:57 Umesh Nerlige Ramappa
  2019-10-14 20:21 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Umesh Nerlige Ramappa @ 2019-10-14 18:57 UTC (permalink / raw)
  To: igt-dev

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

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
 tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 62 insertions(+), 23 deletions(-)

diff --git a/tests/perf.c b/tests/perf.c
index 5ad8b2db..c5fc6878 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -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();
 	}
 
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for test/perf: Add support for TGL in perf tests
  2019-10-14 18:57 [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests Umesh Nerlige Ramappa
@ 2019-10-14 20:21 ` Patchwork
  2019-10-15  7:47 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  2019-10-24 11:22 ` [igt-dev] [PATCH] " Lionel Landwerlin
  2 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-10-14 20:21 UTC (permalink / raw)
  To: Umesh Nerlige Ramappa; +Cc: igt-dev

== 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@gem_exec_suspend@basic-s4-devices.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html

  * 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@gem_mmap_gtt@basic-write-read-distinct.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-icl-u3/igt@gem_mmap_gtt@basic-write-read-distinct.html

  
#### 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@gem_ctx_switch@legacy-render.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-icl-guc/igt@gem_ctx_switch@legacy-render.html

  * 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@gem_ctx_switch@rcs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-cml-s/igt@gem_ctx_switch@rcs0.html

  * 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@kms_chamelium@hdmi-hpd-fast.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
  {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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] ✗ Fi.CI.IGT: failure for test/perf: Add support for TGL in perf tests
  2019-10-14 18:57 [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests Umesh Nerlige Ramappa
  2019-10-14 20:21 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-10-15  7:47 ` Patchwork
  2019-10-24 11:22 ` [igt-dev] [PATCH] " Lionel Landwerlin
  2 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-10-15  7:47 UTC (permalink / raw)
  To: Umesh Nerlige Ramappa; +Cc: igt-dev

== 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@i915_pm_rpm@system-suspend-modeset.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb2/igt@i915_pm_rpm@system-suspend-modeset.html

  
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@gem_eio@unwedge-stress.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb6/igt@gem_eio@unwedge-stress.html

  * 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@gem_exec_balancer@smoke.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb6/igt@gem_exec_balancer@smoke.html

  * 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@gem_exec_schedule@preempt-queue-bsd1.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb5/igt@gem_exec_schedule@preempt-queue-bsd1.html

  * 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@gem_exec_schedule@preemptive-hang-bsd.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@gem_exec_schedule@preemptive-hang-bsd.html

  * 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@gem_tiled_swapping@non-threaded.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk5/igt@gem_tiled_swapping@non-threaded.html
    - 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@gem_tiled_swapping@non-threaded.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-hsw6/igt@gem_tiled_swapping@non-threaded.html

  * 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@gem_userptr_blits@map-fixed-invalidate-busy.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb5/igt@gem_userptr_blits@map-fixed-invalidate-busy.html

  * 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@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-hsw5/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html

  * 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@i915_pm_rc6_residency@rc6-accuracy.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl2/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * 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@kms_atomic_transition@plane-toggle-modeset-transition.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-hsw5/igt@kms_atomic_transition@plane-toggle-modeset-transition.html

  * 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@kms_color@pipe-c-degamma.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl4/igt@kms_color@pipe-c-degamma.html
    - shard-glk:          [PASS][25] -> [FAIL][26] ([fdo#104782])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-glk1/igt@kms_color@pipe-c-degamma.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk2/igt@kms_color@pipe-c-degamma.html
    - shard-kbl:          [PASS][27] -> [FAIL][28] ([fdo#104782])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl6/igt@kms_color@pipe-c-degamma.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl7/igt@kms_color@pipe-c-degamma.html

  * 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@kms_cursor_crc@pipe-c-cursor-alpha-opaque.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl4/igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque.html
    - shard-kbl:          [PASS][31] -> [FAIL][32] ([fdo#103232])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7089/shard-kbl3/igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl7/igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque.html

  * 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@kms_cursor_crc@pipe-c-cursor-suspend.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl7/igt@kms_cursor_crc@pipe-c-cursor-suspend.html

  * 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@kms_flip@flip-vs-expired-vblank.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk6/igt@kms_flip@flip-vs-expired-vblank.html

  * 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@kms_flip@modeset-vs-vblank-race-interruptible.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk5/igt@kms_flip@modeset-vs-vblank-race-interruptible.html

  * 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@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html

  * 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@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * 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@kms_plane_lowres@pipe-a-tiling-y.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb7/igt@kms_plane_lowres@pipe-a-tiling-y.html

  * 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@kms_setmode@basic.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl5/igt@kms_setmode@basic.html

  * 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@perf_pmu@busy-idle-no-semaphores-bcs0.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl6/igt@perf_pmu@busy-idle-no-semaphores-bcs0.html

  
#### 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@gem_eio@in-flight-contexts-immediate.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb7/igt@gem_eio@in-flight-contexts-immediate.html

  * 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@gem_eio@in-flight-suspend.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@gem_eio@in-flight-suspend.html

  * 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@gem_exec_schedule@reorder-wide-bsd.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb7/igt@gem_exec_schedule@reorder-wide-bsd.html

  * 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@gem_tiled_swapping@non-threaded.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl6/igt@gem_tiled_swapping@non-threaded.html

  * 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@gem_userptr_blits@sync-unmap-cycles.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb2/igt@gem_userptr_blits@sync-unmap-cycles.html
    - 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@gem_userptr_blits@sync-unmap-cycles.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-hsw7/igt@gem_userptr_blits@sync-unmap-cycles.html

  * 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@gem_workarounds@suspend-resume-context.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl3/igt@gem_workarounds@suspend-resume-context.html

  * {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@i915_pm_dc@dc6-dpms.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@i915_pm_dc@dc6-dpms.html

  * 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@i915_pm_rc6_residency@rc6-accuracy.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-snb1/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * 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@i915_pm_rpm@modeset-non-lpsp-stress.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl6/igt@i915_pm_rpm@modeset-non-lpsp-stress.html

  * 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@kms_cursor_crc@pipe-b-cursor-64x64-random.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-apl3/igt@kms_cursor_crc@pipe-b-cursor-64x64-random.html

  * 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@kms_flip@flip-vs-suspend-interruptible.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-kbl2/igt@kms_flip@flip-vs-suspend-interruptible.html

  * 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@kms_flip@modeset-vs-vblank-race.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk7/igt@kms_flip@modeset-vs-vblank-race.html

  * 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@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-move.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-glk4/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-move.html

  * 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@kms_plane_lowres@pipe-a-tiling-x.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb3/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * 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@prime_vgem@fence-wait-bsd2.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@prime_vgem@fence-wait-bsd2.html

  
#### 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@gem_ctx_isolation@vcs1-nonpriv.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb1/igt@gem_ctx_isolation@vcs1-nonpriv.html

  * 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@gem_mocs_settings@mocs-isolation-bsd2.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb3/igt@gem_mocs_settings@mocs-isolation-bsd2.html

  * 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@gem_mocs_settings@mocs-settings-bsd2.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb4/igt@gem_mocs_settings@mocs-settings-bsd2.html

  * 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@runner@aborted.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb4/igt@runner@aborted.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3572/shard-iclb2/igt@runner@aborted.html

  
  {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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests
  2019-10-14 18:57 [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests Umesh Nerlige Ramappa
  2019-10-14 20:21 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2019-10-15  7:47 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-10-24 11:22 ` Lionel Landwerlin
  2019-10-24 19:22   ` Umesh Nerlige Ramappa
  2 siblings, 1 reply; 8+ messages in thread
From: Lionel Landwerlin @ 2019-10-24 11:22 UTC (permalink / raw)
  To: Umesh Nerlige Ramappa, igt-dev

On 14/10/2019 21:57, Umesh Nerlige Ramappa wrote:
> 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
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
>   tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------
>   1 file changed, 62 insertions(+), 23 deletions(-)
>
> diff --git a/tests/perf.c b/tests/perf.c
> index 5ad8b2db..c5fc6878 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -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 */


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


>   }
>   
>   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


Where is that test? :)


-Lionel


>   		 */
> -		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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests
  2019-10-24 11:22 ` [igt-dev] [PATCH] " Lionel Landwerlin
@ 2019-10-24 19:22   ` Umesh Nerlige Ramappa
  2019-10-25  6:14     ` Lionel Landwerlin
  0 siblings, 1 reply; 8+ messages in thread
From: Umesh Nerlige Ramappa @ 2019-10-24 19:22 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: igt-dev

On Thu, Oct 24, 2019 at 02:22:51PM +0300, Lionel Landwerlin wrote:
>On 14/10/2019 21:57, Umesh Nerlige Ramappa wrote:
>>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
>>
>>Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>>---
>>  tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------
>>  1 file changed, 62 insertions(+), 23 deletions(-)
>>
>>diff --git a/tests/perf.c b/tests/perf.c
>>index 5ad8b2db..c5fc6878 100644
>>--- a/tests/perf.c
>>+++ b/tests/perf.c
>>@@ -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 */
>
>
>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).

>
>
>>  }
>>  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
>
>
>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

>
>
>-Lionel
>
>
>>  		 */
>>-		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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests
  2019-10-24 19:22   ` Umesh Nerlige Ramappa
@ 2019-10-25  6:14     ` Lionel Landwerlin
  2019-10-30 23:40       ` Umesh Nerlige Ramappa
  0 siblings, 1 reply; 8+ messages in thread
From: Lionel Landwerlin @ 2019-10-25  6:14 UTC (permalink / raw)
  To: Umesh Nerlige Ramappa; +Cc: igt-dev

On 24/10/2019 22:22, Umesh Nerlige Ramappa wrote:
> On Thu, Oct 24, 2019 at 02:22:51PM +0300, Lionel Landwerlin wrote:
>> On 14/10/2019 21:57, Umesh Nerlige Ramappa wrote:
>>> 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
>>>
>>> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>>> ---
>>>  tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------
>>>  1 file changed, 62 insertions(+), 23 deletions(-)
>>>
>>> diff --git a/tests/perf.c b/tests/perf.c
>>> index 5ad8b2db..c5fc6878 100644
>>> --- a/tests/perf.c
>>> +++ b/tests/perf.c
>>> @@ -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 */
>>
>>
>> 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).


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


>
>>
>>
>>>  }
>>>  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
>>
>>
>> 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


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


>
>>
>>
>> -Lionel
>>
>>
>>>           */
>>> -        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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests
  2019-10-25  6:14     ` Lionel Landwerlin
@ 2019-10-30 23:40       ` Umesh Nerlige Ramappa
  0 siblings, 0 replies; 8+ messages in thread
From: Umesh Nerlige Ramappa @ 2019-10-30 23:40 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: igt-dev

On Fri, Oct 25, 2019 at 09:14:35AM +0300, Lionel Landwerlin wrote:
>On 24/10/2019 22:22, Umesh Nerlige Ramappa wrote:
>>On Thu, Oct 24, 2019 at 02:22:51PM +0300, Lionel Landwerlin wrote:
>>>On 14/10/2019 21:57, Umesh Nerlige Ramappa wrote:
>>>>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
>>>>
>>>>Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>>>>---
>>>> tests/perf.c | 85 ++++++++++++++++++++++++++++++++++++++--------------
>>>> 1 file changed, 62 insertions(+), 23 deletions(-)
>>>>
>>>>diff --git a/tests/perf.c b/tests/perf.c
>>>>index 5ad8b2db..c5fc6878 100644
>>>>--- a/tests/perf.c
>>>>+++ b/tests/perf.c
>>>>@@ -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 */
>>>
>>>
>>>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).
>
>
>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

>
>>
>>>
>>>
>>>> }
>>>> 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
>>>
>>>
>>>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
>
>
>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
>
>
>>
>>>
>>>
>>>-Lionel
>>>
>>>
>>>>          */
>>>>-        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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests
@ 2019-10-31  0:24 Umesh Nerlige Ramappa
  0 siblings, 0 replies; 8+ messages in thread
From: Umesh Nerlige Ramappa @ 2019-10-31  0:24 UTC (permalink / raw)
  To: igt-dev, Lionel G Landwerlin

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

v2: Remove error cleanup in mi-rpc

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
 tests/perf.c | 66 ++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 48 insertions(+), 18 deletions(-)

diff --git a/tests/perf.c b/tests/perf.c
index 5ad8b2db..50a28a21 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -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;
@@ -3846,6 +3860,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 +3885,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 +3924,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 +3946,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 +3954,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 +4198,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();
 	}
 
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-31  0:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 18:57 [igt-dev] [PATCH] test/perf: Add support for TGL in perf tests Umesh Nerlige Ramappa
2019-10-14 20:21 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-10-15  7:47 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-10-24 11:22 ` [igt-dev] [PATCH] " Lionel Landwerlin
2019-10-24 19:22   ` Umesh Nerlige Ramappa
2019-10-25  6:14     ` Lionel Landwerlin
2019-10-30 23:40       ` Umesh Nerlige Ramappa
2019-10-31  0:24 Umesh Nerlige Ramappa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.