[PATCH 15/27] drm/i915: Drain freed objects in hugepages selftests

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Sep 22 10:48:35 UTC 2021


In the next commit, we don't evict when refcount = 0, so we need to
call drain freed objects, because we want to pin new bo's in the same
place, causing a test failure.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
index 0827634c842c..b74ed3887994 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -954,6 +954,8 @@ static int igt_mock_ppgtt_64K(void *arg)
 			__i915_gem_object_put_pages(obj);
 			i915_gem_object_unlock(obj);
 			i915_gem_object_put(obj);
+
+			i915_gem_drain_freed_objects(i915);
 		}
 	}
 
@@ -1350,6 +1352,7 @@ static int igt_ppgtt_smoke_huge(void *arg)
 		if (err)
 			break;
 
+		i915_gem_drain_freed_objects(i915);
 		cond_resched();
 	}
 
-- 
2.33.0



More information about the Intel-gfx-trybot mailing list