[igt-dev] [PATCH i-g-t] i915/gem_persistent_relocs: Don't call DROP_IDLE in the middle of submitting

Chris Wilson chris at chris-wilson.co.uk
Tue Aug 6 08:10:52 UTC 2019


To actually DROP_IDLE means that we have to wait for ongoing submission,
and any new concurrently submitted, i.e. it should only be called during
single-threaded submission to ensure the GPU is idle before the new
action.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/i915/gem_persistent_relocs.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/i915/gem_persistent_relocs.c b/tests/i915/gem_persistent_relocs.c
index 452fe686e..14b86e11d 100644
--- a/tests/i915/gem_persistent_relocs.c
+++ b/tests/i915/gem_persistent_relocs.c
@@ -281,10 +281,13 @@ static void do_forked_test(int fd, unsigned flags)
 	struct igt_helper_process thrasher = {};
 
 	if (flags & (THRASH | THRASH_INACTIVE)) {
-		uint64_t val = (flags & THRASH_INACTIVE) ?
-				(DROP_RETIRE | DROP_BOUND | DROP_UNBOUND) : DROP_ALL;
-
 		igt_fork_helper(&thrasher) {
+			uint64_t val;
+
+			val = DROP_RETIRE | DROP_BOUND | DROP_UNBOUND;
+			if (!(flags & THRASH_INACTIVE))
+				val |= DROP_ACTIVE;
+
 			while (1) {
 				usleep(1000);
 				igt_drop_caches_set(fd, val);
-- 
2.23.0.rc1



More information about the igt-dev mailing list