Skip to contentSkip to conversation

tests/i915/gem_ringfill:Adjusted test to utilize all available engines.

PATCH Superseded sai gowtham 3 participants 3 messages Apr 30, 2020

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/gem_ringfill:Adjusted test to utilize all available engines.

Replaced the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.

Added legacy engine coverage and changed subtest name in fast-feedback.testlist from basic-default-forked -->legacy-basic-default-forked.

Cc Dec Katarzyna <[email protected]>
Cc Ursulin Tvrtko <[email protected]>
---
 tests/i915/gem_ringfill.c             | 53 +++++++++++++++++----------
 tests/intel-ci/fast-feedback.testlist |  2 +-
 2 files changed, 34 insertions(+), 21 deletions(-)
tests/i915/gem_ringfill.c +33 -20
index 4c73f4d9..dee10330 100644
@@ -96,7 +96,7 @@ static int setup_execbuf(int fd,
 			 struct drm_i915_gem_execbuffer2 *execbuf,
 			 struct drm_i915_gem_exec_object2 *obj,
 			 struct drm_i915_gem_relocation_entry *reloc,
-			 unsigned int ring)
+			 const struct intel_execution_engine2 *e)
 {
 	const int gen = intel_gen(intel_get_drm_devid(fd));
 	const uint32_t bbe = MI_BATCH_BUFFER_END;
@@ -109,7 +109,7 @@ static int setup_execbuf(int fd,
 	memset(reloc, 0, 1024*sizeof(*reloc));
 
 	execbuf->buffers_ptr = to_user_pointer(obj);
-	execbuf->flags = ring | (1 << 11) | (1 << 12);
+	execbuf->flags = e->flags | (1 << 11) | (1 << 12);
 
 	if (gen > 3 && gen < 6)
 		execbuf->flags |= I915_EXEC_SECURE;
@@ -170,25 +170,25 @@ static int setup_execbuf(int fd,
 	return 0;
 }
 
-static void run_test(int fd, unsigned ring, unsigned flags, unsigned timeout)
+static void run_test(int fd, const struct intel_execution_engine2 *e, unsigned flags, unsigned timeout)
 {
+	int i915;
 	struct drm_i915_gem_exec_object2 obj[2];
 	struct drm_i915_gem_relocation_entry reloc[1024];
 	struct drm_i915_gem_execbuffer2 execbuf;
 	igt_hang_t hang;
 
-	gem_require_ring(fd, ring);
-	igt_require(gem_can_store_dword(fd, ring));
+	igt_require(gem_class_can_store_dword(fd, e->class));
 
 	if (flags & (SUSPEND | HIBERNATE))
-		run_test(fd, ring, 0, 0);
+		run_test(fd, e, 0, 0);
 
 	gem_quiescent_gpu(fd);
-	igt_require(setup_execbuf(fd, &execbuf, obj, reloc, ring) == 0);
+	igt_require(setup_execbuf(fd, &execbuf, obj, reloc, e) == 0);
 
 	memset(&hang, 0, sizeof(hang));
 	if (flags & HANG)
-		hang = igt_hang_ring(fd, ring & ~(3<<13));
+		hang = igt_hang_ring(fd, e->flags & ~(3<<13));
 
 	if (flags & (CHILD | FORKED | BOMB)) {
 		int nchild;
@@ -203,8 +203,9 @@ static void run_test(int fd, unsigned ring, unsigned flags, unsigned timeout)
 		igt_debug("Forking %d children\n", nchild);
 		igt_fork(child, nchild) {
 			if (flags & NEWFD) {
-				fd = drm_open_driver(DRIVER_INTEL);
-				setup_execbuf(fd, &execbuf, obj, reloc, ring);
+				i915 = drm_open_driver(DRIVER_INTEL);
+				gem_context_copy_engines(fd, 0, i915, 0);
+				setup_execbuf(i915, &execbuf, obj, reloc, e);
 			}
 			fill_ring(fd, &execbuf, flags, timeout);
 		}
@@ -235,11 +236,13 @@ static void run_test(int fd, unsigned ring, unsigned flags, unsigned timeout)
 	gem_quiescent_gpu(fd);
 
 	if (flags & (SUSPEND | HIBERNATE))
-		run_test(fd, ring, 0, 0);
+		run_test(fd, e, 0, 0);
 }
 
 igt_main
 {
+	const struct intel_execution_engine2 *e2;
+	const struct intel_execution_engine *e;
 	const struct {
 		const char *suffix;
 		unsigned flags;
@@ -276,17 +279,27 @@ igt_main
 		igt_info("Ring size: %d batches\n", ring_size);
 		igt_require(ring_size);
 	}
-
 	for (m = modes; m->suffix; m++) {
-		const struct intel_execution_engine *e;
-
+		/* Legacy testing must be first. */
 		for (e = intel_execution_engines; e->name; e++) {
-			igt_subtest_f("%s%s%s",
-				      m->basic && !e->exec_id ? "basic-" : "",
-				      e->name,
-				      m->suffix) {
-				igt_skip_on(m->flags & NEWFD && master);
-				run_test(fd, eb_ring(e), m->flags, m->timeout);
+			struct intel_execution_engine2 e2__;
+			e2__ = gem_eb_flags_to_engine(eb_ring(e));
+			if (e2__.flags == -1)
+				continue;
+			e2 = &e2__;
+			igt_skip_on(m->flags & NEWFD && master);
+			igt_subtest_f("legacy-%s%s%s",
+					m->basic && !e->exec_id ? "basic-" : "",
+					e->name,
+					m->suffix)
+				run_test(fd, e2, m->flags, m->timeout);
+		}
+		igt_skip_on(m->flags & NEWFD && master);
+		igt_subtest_with_dynamic_f("%s%s", m->basic  ? "basic" : "",  m->suffix) {
+			__for_each_physical_engine(fd, e2) {
+				igt_dynamic_f("%s", e2->name) {
+					run_test(fd, e2, m->flags, m->timeout);
+				}
 			}
 		}
 	}
tests/intel-ci/fast-feedback.testlist +1 -1
index 2ccad438..aef69eef 100644
@@ -35,7 +35,7 @@ igt@gem_mmap@basic
 igt@gem_mmap_gtt@basic
 igt@gem_render_linear_blits@basic
 igt@gem_render_tiled_blits@basic
-igt@gem_ringfill@basic-default-forked
+igt@gem_ringfill@legacy-basic-default-forked
 igt@gem_sync@basic-all
 igt@gem_sync@basic-each
 igt@gem_tiled_blits@basic
Signature · 6 lines
2.25.0

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

Quoting sai gowtham (2020-04-30 12:23:42)

Quoted 19 lines
        for (m = modes; m->suffix; m++) {
tests/i915/gem_ringfill.c +9 -8
-               const struct intel_execution_engine *e;
-
+               /* Legacy testing must be first. */
                for (e = intel_execution_engines; e->name; e++) {
-                       igt_subtest_f("%s%s%s",
-                                     m->basic && !e->exec_id ? "basic-" : "",
-                                     e->name,
-                                     m->suffix) {
-                               igt_skip_on(m->flags & NEWFD && master);
-                               run_test(fd, eb_ring(e), m->flags, m->timeout);
+                       struct intel_execution_engine2 e2__;
+                       e2__ = gem_eb_flags_to_engine(eb_ring(e));
+                       if (e2__.flags == -1)
+                               continue;
+                       e2 = &e2__;
+                       igt_skip_on(m->flags & NEWFD && master);
+                       igt_subtest_f("legacy-%s%s%s",
+                                       m->basic && !e->exec_id ? "basic-" : "",

tests/i915/gem_ringfill.c igt_main · line 302

Quoted 10 lines
tests/i915/gem_ringfill.c +10 -0
+                                       e->name,
+                                       m->suffix)
+                               run_test(fd, e2, m->flags, m->timeout);
+               }
+               igt_skip_on(m->flags & NEWFD && master);
+               igt_subtest_with_dynamic_f("%s%s", m->basic  ? "basic" : "",  m->suffix) {
+                       __for_each_physical_engine(fd, e2) {
+                               igt_dynamic_f("%s", e2->name) {
+                                       run_test(fd, e2, m->flags, m->timeout);
+                               }

Dynamic selection for one and not the other?

Just because of default-forked? Try tuning all for use in BAT. -Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/gem_ringfill:Adjusted test to utilize all available engines.

In reply to sai gowtham
== Series Details ==

== Series Details ==

Series: tests/i915/gem_ringfill:Adjusted test to utilize all available engines.
URL : https://patchwork.freedesktop.org/series/76772/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8401 -> IGTPW_4520
====================================================

Summary
-------

**FAILURE**

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

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

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8401/fi-pnv-d510/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4520/fi-pnv-d510/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@debugfs_test@read_all_entries:
- fi-kbl-7500u: NOTRUN -> [{ABORT}][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4520/fi-kbl-7500u/igt@debugfs_test@read_all_entries.html

New tests
---------

New tests have been introduced between CI_DRM_8401 and IGTPW_4520:

### New IGT tests (1) ###

* igt@gem_ringfill@legacy-basic-default-forked:
- Statuses : 38 pass(s) 2 skip(s)
- Exec time: [0.0, 0.23] s

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

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

### IGT changes ###

#### Possible fixes ####

* igt@i915_selftest@live@gem_contexts:
- fi-bwr-2160: [INCOMPLETE][4] ([i915#489]) -> [PASS][5]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8401/fi-bwr-2160/igt@i915_selftest@live@gem_contexts.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4520/fi-bwr-2160/igt@i915_selftest@live@gem_contexts.html

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

[i915#489]: https://gitlab.freedesktop.org/drm/intel/issues/489

Participating hosts (50 -> 43)
------------------------------

Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u fi-byt-clapper

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

* CI: CI-20190529 -> None
* IGT: IGT_5617 -> IGTPW_4520

CI-20190529: 20190529
CI_DRM_8401: 41fac0e3809be301af095c66e717eb9843b80212 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4520: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4520/index.html
IGT_5617: 807b26292a3f21057ef7865a4028d22c512590df @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+++ 63 lines
--- 63 lines

== Logs ==

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