Skip to contentSkip to conversation

gem_wsim: Fix calibration for special VCS engine name

PATCH New Tvrtko Ursulin 2 participants 3 messages Mar 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gem_wsim: Fix calibration for special VCS engine name

From: Tvrtko Ursulin <[email protected]>

VCS is a special (non-physical) engine id/name which means load-balancing in legacy workloads. As such when i915 balancing is not enabled it needs to have a calibration as well.

---
 benchmarks/gem_wsim.c | 2 ++
 1 file changed, 2 insertions(+)
benchmarks/gem_wsim.c +2 -0
index a1bbcef031bb..c196b25317ce 100644
@@ -3353,6 +3353,8 @@ int main(int argc, char **argv)
 						engine_calib_map[eng] = calib_val;
 						if (eng == RCS)
 							engine_calib_map[DEFAULT] = calib_val;
+						else if (eng == VCS1 || eng == VCS2)
+							engine_calib_map[VCS] = calib_val;
 						has_nop_calibration = true;
 					}
 				} else {
Signature · 6 lines
2.20.1

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

PATCH 2/2 gem_wsim: Mark contexts as non-persistent

From: Tvrtko Ursulin <[email protected]>

We want to mark workload contexts as non-persistent if possible so that we do not have to worry about leaving long (or infinite!) batches running post exit.

---
 benchmarks/gem_wsim.c | 50 ++++++++++++++++++++++++++++++++++++-------
 1 file changed, 42 insertions(+), 8 deletions(-)
benchmarks/gem_wsim.c +42 -8
index c196b25317ce..7cb8ea5b18ba 100644
@@ -1431,16 +1431,48 @@ alloc_step_batch(struct workload *wrk, struct w_step *w, unsigned int flags)
 #endif
 }
 
-static void __ctx_set_prio(uint32_t ctx_id, unsigned int prio)
+static bool has_persistence(int i915)
 {
-	struct drm_i915_gem_context_param param = {
-		.ctx_id = ctx_id,
-		.param = I915_CONTEXT_PARAM_PRIORITY,
-		.value = prio,
+	struct drm_i915_gem_context_param p = {
+		.param = I915_CONTEXT_PARAM_PERSISTENCE,
 	};
+	uint64_t saved;
+
+	if (__gem_context_get_param(i915, &p))
+		return false;
+
+	saved = p.value;
+	p.value = 0;
+	if (__gem_context_set_param(i915, &p))
+		return false;
+
+	p.value = saved;
+	return __gem_context_set_param(i915, &p) == 0;
+}
+
+static bool __has_persistence;
+
+static void __configure_context(uint32_t ctx_id, unsigned int prio)
+{
+	if (prio) {
+		struct drm_i915_gem_context_param param = {
+			.ctx_id = ctx_id,
+			.param = I915_CONTEXT_PARAM_PRIORITY,
+			.value = prio,
+		};
 
-	if (prio)
 		gem_context_set_param(fd, &param);
+	}
+
+	/* Mark as non-persistent if supported. */
+	if (__has_persistence) {
+		struct drm_i915_gem_context_param param = {
+			.ctx_id = ctx_id,
+			.param = I915_CONTEXT_PARAM_PERSISTENCE,
+		};
+
+		gem_context_set_param(fd, &param);
+	}
 }
 
 static int __vm_destroy(int i915, uint32_t vm_id)
@@ -1743,7 +1775,7 @@ prepare_workload(unsigned int id, struct workload *wrk, unsigned int flags)
 			ctx_vcs ^= 1;
 		}
 
-		__ctx_set_prio(ctx_id, wrk->prio);
+		__configure_context(ctx_id, wrk->prio);
 
 		/*
 		 * Do we need a separate context to satisfy this workloads which
@@ -1772,7 +1804,7 @@ prepare_workload(unsigned int id, struct workload *wrk, unsigned int flags)
 			ctx_id = args.ctx_id;
 			wrk->ctx_list[i + 1].id = args.ctx_id;
 
-			__ctx_set_prio(ctx_id, wrk->prio);
+			__configure_context(ctx_id, wrk->prio);
 		}
 
 		if (ctx->engine_map) {
@@ -3280,6 +3312,8 @@ int main(int argc, char **argv)
 	fd = __drm_open_driver(DRIVER_INTEL);
 	igt_require(fd);
 
+	__has_persistence = has_persistence(fd);
+
 	intel_register_access_init(&mmio_data, intel_get_pci_device(), false, fd);
 
 	init_clocks();
Signature · 6 lines
2.20.1

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

[igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] gem_wsim: Fix calibration for special VCS engine name

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/2] gem_wsim: Fix calibration for special VCS engine name
URL : https://patchwork.freedesktop.org/series/74395/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8084 -> IGTPW_4273
====================================================

Summary
-------

**FAILURE**

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

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

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_parallel@fds:
- fi-cfl-guc: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8084/fi-cfl-guc/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4273/fi-cfl-guc/igt@[email protected]
- fi-cfl-8700k: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8084/fi-cfl-8700k/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4273/fi-cfl-8700k/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@prime_vgem@basic-fence-flip:
- fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8084/fi-tgl-y/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4273/fi-tgl-y/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gem_contexts:
- fi-cml-s: [DMESG-FAIL][7] ([i915#877]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8084/fi-cml-s/igt@i915_selftest@live@gem_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4273/fi-cml-s/igt@i915_selftest@live@gem_contexts.html

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-icl-u2: [FAIL][9] ([i915#217]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8084/fi-icl-u2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4273/fi-icl-u2/igt@[email protected]

* igt@vgem_basic@setversion:
- fi-tgl-y: [DMESG-WARN][11] ([CI#94] / [i915#402]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8084/fi-tgl-y/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4273/fi-tgl-y/igt@[email protected]

#### Warnings ####

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][13] ([fdo#111096] / [i915#323]) -> [FAIL][14] ([fdo#111407])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8084/fi-kbl-7500u/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4273/fi-kbl-7500u/igt@[email protected]

[CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877

Participating hosts (41 -> 46)
------------------------------

Additional (9): fi-kbl-7560u fi-bsw-n3050 fi-skl-6770hq fi-glk-dsi fi-elk-e7500 fi-skl-6700k2 fi-blb-e6850 fi-bsw-kefka fi-skl-6600u
Missing (4): fi-ctg-p8600 fi-byt-squawks fi-bsw-cyan fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5496 -> IGTPW_4273

CI-20190529: 20190529
CI_DRM_8084: 36d1d55dd2ae3d50a3ff1899e576b567be7b7530 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4273: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4273/index.html
IGT_5496: 00a8e400876f2c27f62ed7d418be6b55738a4ea6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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