Skip to contentSkip to conversation

tests/i915/gem_ctx_engines: Added out fence for execute-one subtest

PATCH In review Arjun Melkaveri 3 participants 4 messages Dec 8, 2021 – Dec 9, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/gem_ctx_engines: Added out fence for execute-one subtest

To make spinner to be on same context for following execbuf, spin out_fence is passed to execbuf.rsvd2.

Used IGT_SPIN_FENCE_OUT flag in spinner, we can stop using no-preemption.

Added I915_EXEC_FENCE_IN to the execbuf.flags so that it is executed after the spinner.
(Suggested by Chris Wilson).

---
 tests/i915/gem_ctx_engines.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
tests/i915/gem_ctx_engines.c +4 -3
index 003dd171..0b8d5c78 100644
@@ -298,7 +298,7 @@ static void execute_one(int i915)
 			spin = igt_spin_new(i915,
 					    .ahnd = ahnd,
 					    .ctx = ctx,
-					    .flags = (IGT_SPIN_NO_PREEMPTION |
+					    .flags = (IGT_SPIN_FENCE_OUT |
 						      IGT_SPIN_POLL_RUN));
 
 			do_ioctl(i915, DRM_IOCTL_I915_GEM_BUSY, &busy);
@@ -314,13 +314,13 @@ static void execute_one(int i915)
 			}
 			cfg.num_engines = GEM_MAX_ENGINES;
 			ctx = intel_ctx_create(i915, &cfg);
+			execbuf.rsvd2 = spin->execbuf.rsvd2 >> 32;
 
-			igt_spin_busywait_until_started(spin);
 			for (int j = 0; j <= I915_EXEC_RING_MASK; j++) {
 				int expected = j == i ? 0 : -EINVAL;
 
 				execbuf.rsvd1 = ctx->id;
-				execbuf.flags = j;
+				execbuf.flags = j | I915_EXEC_FENCE_IN;
 				igt_assert_f(__gem_execbuf(i915, &execbuf) == expected,
 					     "Failed to report the %s engine for slot %d (valid at %d)\n",
 					     j == i ? "valid" : "invalid", j, i);
@@ -331,6 +331,7 @@ static void execute_one(int i915)
 				      i != -1 ? 1 << e->class : 0);
 
 			igt_spin_free(i915, spin);
+			close(spin->execbuf.rsvd2 >> 32);
 			put_ahnd(ahnd);
 
 			gem_sync(i915, obj.handle);
Signature · 1 line
2.25.1
#1 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/gem_ctx_engines: Added out fence for execute-one subtest (rev3)

== Series Details ==

== Series Details ==

Series: tests/i915/gem_ctx_engines: Added out fence for execute-one subtest (rev3)
URL : https://patchwork.freedesktop.org/series/97623/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10973 -> IGTPW_6478
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_6478, 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_6478/index.html

Participating hosts (45 -> 38)
------------------------------

Additional (2): fi-kbl-soraka fi-icl-u2
Missing (9): fi-ilk-m540 bat-dg1-6 bat-dg1-5 fi-hsw-4200u fi-bsw-cyan bat-adlp-6 bat-adlp-4 fi-ctg-p8600 bat-jsl-1

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

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

### IGT changes ###

#### Possible regressions ####

* igt@core_hotunplug@unbind-rebind:
- fi-pnv-d510: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10973/fi-pnv-d510/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-pnv-d510/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2: NOTRUN -> [SKIP][3] ([fdo#109315]) +17 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-icl-u2/igt@amdgpu/[email protected]

* igt@core_hotunplug@unbind-rebind:
- fi-tgl-u2: [PASS][4] -> [INCOMPLETE][5] ([i915#4006])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10973/fi-tgl-u2/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-tgl-u2/igt@[email protected]

* igt@gem_exec_fence@basic-busy@bcs0:
- fi-kbl-soraka: NOTRUN -> [SKIP][6] ([fdo#109271]) +8 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-kbl-soraka/igt@gem_exec_fence@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#2190])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-kbl-soraka/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][8] ([i915#2190])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-icl-u2/igt@[email protected]

* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#4613]) +3 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-kbl-soraka/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- fi-icl-u2: NOTRUN -> [SKIP][10] ([i915#4613]) +3 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-icl-u2/igt@[email protected]

* igt@i915_selftest@live@gt_engines:
- fi-rkl-guc: [PASS][11] -> [DMESG-FAIL][12] ([i915#4432])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10973/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html

* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][13] ([i915#1886] / [i915#2291])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-soraka: NOTRUN -> [SKIP][14] ([fdo#109271] / [fdo#111827]) +8 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-kbl-soraka/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: NOTRUN -> [SKIP][15] ([fdo#111827]) +8 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-icl-u2/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-icl-u2: NOTRUN -> [SKIP][16] ([fdo#109278]) +2 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-icl-u2/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-icl-u2: NOTRUN -> [SKIP][17] ([fdo#109285])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-icl-u2/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-kbl-soraka: NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#533])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-kbl-soraka/igt@[email protected]

* igt@kms_psr@primary_page_flip:
- fi-skl-6600u: [PASS][19] -> [FAIL][20] ([i915#4547])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10973/fi-skl-6600u/igt@kms_psr@primary_page_flip.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-skl-6600u/igt@kms_psr@primary_page_flip.html

* igt@prime_vgem@basic-userptr:
- fi-icl-u2: NOTRUN -> [SKIP][21] ([i915#3301])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-icl-u2/igt@[email protected]

* igt@runner@aborted:
- fi-skl-6600u: NOTRUN -> [FAIL][22] ([i915#3363] / [i915#4312])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-skl-6600u/igt@[email protected]
- fi-rkl-guc: NOTRUN -> [FAIL][23] ([i915#3928] / [i915#4312])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-rkl-guc/igt@[email protected]
- fi-tgl-u2: NOTRUN -> [FAIL][24] ([i915#2722] / [i915#4312])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-tgl-u2/igt@[email protected]

#### Possible fixes ####

* igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2: [DMESG-WARN][25] ([i915#4269]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10973/fi-cml-u2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/fi-cml-u2/igt@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
[i915#3928]: https://gitlab.freedesktop.org/drm/intel/issues/3928
[i915#4006]: https://gitlab.freedesktop.org/drm/intel/issues/4006
[i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4432]: https://gitlab.freedesktop.org/drm/intel/issues/4432
[i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533

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

* CI: CI-20190529 -> None
* IGT: IGT_6303 -> IGTPW_6478

CI-20190529: 20190529
CI_DRM_10973: e540b0c4da51fd576e9b61489899acd074a0e4cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_6478: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/index.html
IGT_6303: 49deb6b505c293a60dd3b3976a63c467bf88442e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6478/index.html

#2 lore raw
In reply to Arjun Melkaveri
Quoted 30 lines · Arjun Melkaveri

To make spinner to be on same context for following execbuf, spin out_fence is passed to execbuf.rsvd2.

Used IGT_SPIN_FENCE_OUT flag in spinner, we can stop using no-preemption.

Added I915_EXEC_FENCE_IN to the execbuf.flags so that it is executed after the spinner.
(Suggested by Chris Wilson).

---
 tests/i915/gem_ctx_engines.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
tests/i915/gem_ctx_engines.c +1 -1
index 003dd171..0b8d5c78 100644
@@ -298,7 +298,7 @@ static void execute_one(int i915)
 			spin = igt_spin_new(i915,
 					    .ahnd = ahnd,
 					    .ctx = ctx,
-					    .flags = (IGT_SPIN_NO_PREEMPTION |
+					    .flags = (IGT_SPIN_FENCE_OUT |
 						      IGT_SPIN_POLL_RUN));
 
 			do_ioctl(i915, DRM_IOCTL_I915_GEM_BUSY, &busy);

tests/i915/gem_ctx_engines.c static void execute_one(int i915) · line 317

Quoted 4 lines
tests/i915/gem_ctx_engines.c +1 -0
@@ -314,13 +314,13 @@ static void execute_one(int i915)
 			}
 			cfg.num_engines = GEM_MAX_ENGINES;
 			ctx = intel_ctx_create(i915, &cfg);
+			execbuf.rsvd2 = spin->execbuf.rsvd2 >> 32;

Check spin->fence_out. In this case doesn't matter but for merging fences it can.

Quoted 12 lines
tests/i915/gem_ctx_engines.c +1 -2
-			igt_spin_busywait_until_started(spin);
 			for (int j = 0; j <= I915_EXEC_RING_MASK; j++) {
 				int expected = j == i ? 0 : -EINVAL;
 
 				execbuf.rsvd1 = ctx->id;
-				execbuf.flags = j;
+				execbuf.flags = j | I915_EXEC_FENCE_IN;
 				igt_assert_f(__gem_execbuf(i915, &execbuf) == expected,
 					     "Failed to report the %s engine for slot %d (valid at %d)\n",
 					     j == i ? "valid" : "invalid", j, i);

tests/i915/gem_ctx_engines.c static void execute_one(int i915) · line 334

Quoted 4 lines
tests/i915/gem_ctx_engines.c +1 -0
@@ -331,6 +331,7 @@ static void execute_one(int i915)
 				      i != -1 ? 1 << e->class : 0);
 
 			igt_spin_free(i915, spin);
+			close(spin->execbuf.rsvd2 >> 32);

And look at igt_spin_free() function what it does with fence_out.

--
Zbigniew

Quoted 6 lines
tests/i915/gem_ctx_engines.c +0 -0
 			put_ahnd(ahnd);
 
 			gem_sync(i915, obj.handle);
Signature · 1 line
2.25.1
#3 lore raw
Quoted 53 lines · Zbigniew Kempczyński
Quoted 30 lines · Arjun Melkaveri

To make spinner to be on same context for following execbuf, spin out_fence is passed to execbuf.rsvd2.

Used IGT_SPIN_FENCE_OUT flag in spinner, we can stop using no-preemption.

Added I915_EXEC_FENCE_IN to the execbuf.flags so that it is executed after the spinner.
(Suggested by Chris Wilson).

---
 tests/i915/gem_ctx_engines.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
tests/i915/gem_ctx_engines.c +1 -1
index 003dd171..0b8d5c78 100644
@@ -298,7 +298,7 @@ static void execute_one(int i915)
 			spin = igt_spin_new(i915,
 					    .ahnd = ahnd,
 					    .ctx = ctx,
-					    .flags = (IGT_SPIN_NO_PREEMPTION |
+					    .flags = (IGT_SPIN_FENCE_OUT |
 						      IGT_SPIN_POLL_RUN));
 
 			do_ioctl(i915, DRM_IOCTL_I915_GEM_BUSY, &busy);

tests/i915/gem_ctx_engines.c static void execute_one(int i915) · line 317

Quoted 4 lines
tests/i915/gem_ctx_engines.c +1 -0
@@ -314,13 +314,13 @@ static void execute_one(int i915)
 			}
 			cfg.num_engines = GEM_MAX_ENGINES;
 			ctx = intel_ctx_create(i915, &cfg);
+			execbuf.rsvd2 = spin->execbuf.rsvd2 >> 32;

Check spin->fence_out. In this case doesn't matter but for merging fences it can.

Quoted 14 lines
tests/i915/gem_ctx_engines.c +1 -2
-			igt_spin_busywait_until_started(spin);
 			for (int j = 0; j <= I915_EXEC_RING_MASK; j++) {
 				int expected = j == i ? 0 : -EINVAL;
 
 				execbuf.rsvd1 = ctx->id;
-				execbuf.flags = j;
+				execbuf.flags = j | I915_EXEC_FENCE_IN;
 				igt_assert_f(__gem_execbuf(i915, &execbuf) == expected,
 					     "Failed to report the %s engine for slot %d (valid at %d)\n",
 					     j == i ? "valid" : "invalid", j, i);
@@ -331,6 +331,7 @@ static void execute_one(int i915)
 				      i != -1 ? 1 << e->class : 0);
 
Quoted 4 lines

tests/i915/gem_ctx_engines.c static void execute_one(int i915) · line 334

Quoted 2 lines
tests/i915/gem_ctx_engines.c +1 -0
 			igt_spin_free(i915, spin);
+			close(spin->execbuf.rsvd2 >> 32);

And look at igt_spin_free() function what it does with fence_out.

@Zbigniew :- right igt_spin_free does "close(spin->out_fence)".

I'll be modifying code to retain old implementaion i.e using igt_spin_end instead of igt_spin_free.

Quoted 10 lines

--
Zbigniew

Quoted 6 lines
tests/i915/gem_ctx_engines.c +0 -0
 			put_ahnd(ahnd);
 
 			gem_sync(i915, obj.handle);
Signature · 1 line
2.25.1