All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: [igt-dev] [PATCH i-g-t 20/24] tests/gem_ppgtt: Adopt test to use intel_bb with allocator
Date: Thu, 22 Oct 2020 11:59:03 +0200	[thread overview]
Message-ID: <20201022095907.34225-21-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20201022095907.34225-1-zbigniew.kempczynski@intel.com>

Tests work in multiprocess environment so we must turn on/off
thread in parent process which is responsible for allocations.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_ppgtt.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
index 73bd19c5..b9b3d1fc 100644
--- a/tests/i915/gem_ppgtt.c
+++ b/tests/i915/gem_ppgtt.c
@@ -136,6 +136,7 @@ static void fork_rcs_copy(int timeout, uint32_t final,
 			    dst[child], 0, 0);
 
 		intel_buf_destroy(src);
+		dst[child]->addr.offset = INTEL_BUF_INVALID_ADDRESS;
 
 		intel_bb_destroy(ibb);
 	}
@@ -175,6 +176,7 @@ static void fork_bcs_copy(int timeout, uint32_t final,
 
 			intel_buf_destroy(src[1]);
 			intel_buf_destroy(src[0]);
+			intel_bb_reset(ibb, true);
 		}
 
 		src[0] = create_bo(dst[child]->bops, ~0);
@@ -190,6 +192,7 @@ static void fork_bcs_copy(int timeout, uint32_t final,
 
 		intel_buf_destroy(src[1]);
 		intel_buf_destroy(src[0]);
+		dst[child]->addr.offset = INTEL_BUF_INVALID_ADDRESS;
 
 		intel_bb_destroy(ibb);
 	}
@@ -288,6 +291,8 @@ igt_main
 	igt_subtest("blt-vs-render-ctx0") {
 		struct intel_buf *bcs[1], *rcs[N_CHILD];
 
+		intel_allocator_multiprocess_start();
+
 		fork_bcs_copy(30, 0x4000, bcs, 1);
 		fork_rcs_copy(30, 0x8000 / N_CHILD, rcs, N_CHILD, 0);
 
@@ -298,6 +303,8 @@ igt_main
 
 		cleanup_bufs(bcs, 1);
 		cleanup_bufs(rcs, N_CHILD);
+
+		intel_allocator_multiprocess_stop();
 	}
 
 	igt_subtest("blt-vs-render-ctxN") {
@@ -305,6 +312,8 @@ igt_main
 
 		igt_require(has_contexts());
 
+		intel_allocator_multiprocess_start();
+
 		fork_rcs_copy(30, 0x8000 / N_CHILD, rcs, N_CHILD, CREATE_CONTEXT);
 		fork_bcs_copy(30, 0x4000, bcs, 1);
 
@@ -315,6 +324,8 @@ igt_main
 
 		cleanup_bufs(bcs, 1);
 		cleanup_bufs(rcs, N_CHILD);
+
+		intel_allocator_multiprocess_stop();
 	}
 
 	igt_subtest("flink-and-close-vma-leak")
-- 
2.26.0

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

  parent reply	other threads:[~2020-10-22  9:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  9:58 [igt-dev] [PATCH i-g-t 00/24] Introduce IGT allocator Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 01/24] lib/igt_list: igt_hlist implementation Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 02/24] lib/igt_map: Introduce igt_map Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 03/24] lib/igt_core: Track child process pid and tid Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 04/24] lib/intel_allocator_simple: Add simple allocator Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 05/24] lib/intel_allocator_random: Add random allocator Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 06/24] lib/intel_allocator: Add intel_allocator core Zbigniew Kempczyński
2020-10-22 10:09   ` Petri Latvala
2020-10-22 10:13     ` Chris Wilson
2020-10-22 10:14   ` Chris Wilson
2020-10-22 15:51     ` Jani Nikula
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 07/24] lib/intel_allocator: Try to stop smoothly instead of deinit Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 08/24] lib/intel_allocator_msgchannel: Scale to 4k of parallel clients Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 09/24] lib/intel_bufops: Removes handle from allocator, change size Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 10/24] lib/intel_bufops: Add init with handle and size function Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 11/24] lib/intel_batchbuffer: Integrate intel_bb with allocator Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 12/24] lib/intel_batchbuffer: Add tracking intel_buf to intel_bb Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 13/24] lib/intel_aux_pgtable: Get addresses for aux table from an allocator Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 14/24] lib/igt_fb: Initialize intel_buf with same size as fb Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 15/24] tests/api_intel_bb: Modify test to verify intel_bb with allocator Zbigniew Kempczyński
2020-10-22  9:58 ` [igt-dev] [PATCH i-g-t 16/24] tests/api_intel_bb: Add compressed->compressed copy Zbigniew Kempczyński
2020-10-22  9:59 ` [igt-dev] [PATCH i-g-t 17/24] tests/api_intel_allocator: Simple allocator test suite Zbigniew Kempczyński
2020-10-22  9:59 ` [igt-dev] [PATCH i-g-t 18/24] tests/gem|kms: Remove intel_bb from fixture Zbigniew Kempczyński
2020-10-22  9:59 ` [igt-dev] [PATCH i-g-t 19/24] tests/gem_mmap_offset: Use intel_buf wrapper code instead direct Zbigniew Kempczyński
2020-10-22  9:59 ` Zbigniew Kempczyński [this message]
2020-10-22  9:59 ` [igt-dev] [PATCH i-g-t 21/24] tests/gem_render_copy_redux: Adopt to use with intel_bb and allocator Zbigniew Kempczyński
2020-10-22  9:59 ` [igt-dev] [PATCH i-g-t 22/24] tests/perf.c: Remove buffer from batch Zbigniew Kempczyński
2020-10-22  9:59 ` [igt-dev] [PATCH i-g-t 23/24] tests/gem_linear_blits: Use intel allocator Zbigniew Kempczyński
2020-10-22  9:59 ` [igt-dev] [PATCH i-g-t 24/24] lib/intel_batchbuffer.c: Debug bb in CI Zbigniew Kempczyński
2020-10-22 10:51 ` [igt-dev] ✓ Fi.CI.BAT: success for Introduce IGT allocator Patchwork
2020-10-22 14:04 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022095907.34225-21-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.