On 29/04/2020 18:05, Chris Wilson wrote:
Wait until the GPU is idle before starting a fresh round of probing
gen8-unprivileged-single-ctx-counter. This avoids building up a huge
backlog of render copies, hogging buffers and stale contexts, and
invoking the oomkiller.
v2: Release everything before starting again.
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
Thanks,
-Lionel
---
tests/perf.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/tests/perf.c b/tests/perf.c
index 74fc8fd87..7bde46af8 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -3762,19 +3762,9 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
igt_assert_eq(ret, 0);
ret = memcmp(src[0].bo->virtual, dst[0].bo->virtual, 4 * width * height);
- if (ret != 0) {
- accumulator_print(&accumulator, "total");
- /* This needs to be investigated... From time
- * to time, the work we kick off doesn't seem
- * to happen. WTH?? */
- exit(EAGAIN);
- }
-
drm_intel_bo_unmap(src[0].bo);
drm_intel_bo_unmap(dst[0].bo);
- igt_assert_eq(accumulator.deltas[2 + 26], width * height);
-
for (int i = 0; i < ARRAY_SIZE(src); i++) {
drm_intel_bo_unreference(src[i].bo);
drm_intel_bo_unreference(dst[i].bo);
@@ -3787,6 +3777,17 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
drm_intel_gem_context_destroy(context1);
drm_intel_bufmgr_destroy(bufmgr);
__perf_close(stream_fd);
+ gem_quiescent_gpu(drm_fd);
+
+ if (ret != 0) {
+ accumulator_print(&accumulator, "total");
+ /* This needs to be investigated... From time
+ * to time, the work we kick off doesn't seem
+ * to happen. WTH?? */
+ exit(EAGAIN);
+ }
+
+ igt_assert_eq(accumulator.deltas[2 + 26], width * height);
}
child_ret = igt_wait_helper(&child);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx