[PATCH i-g-t] i915/drm_fdinfo: Quiesce GPU prior to running some tests

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Wed Oct 2 21:20:49 UTC 2024


Sometimes render is still running a remnant of a prior workload when we
expect it to be idle. This throws some tests off. Ensure that these
tests wait for a quiescent state prior to checking if render is idle.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12179
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
---
 tests/intel/drm_fdinfo.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/intel/drm_fdinfo.c b/tests/intel/drm_fdinfo.c
index 45d17aaaa..b66ac9e1b 100644
--- a/tests/intel/drm_fdinfo.c
+++ b/tests/intel/drm_fdinfo.c
@@ -219,6 +219,8 @@ single(int gem_fd, const intel_ctx_t *ctx,
 	int spin_fd;
 	uint64_t ahnd;
 
+	gem_quiescent_gpu(gem_fd);
+
 	if (flags & TEST_BUSY)
 		igt_require(!gem_using_guc_submission(gem_fd));
 
@@ -374,6 +376,8 @@ most_busy_check_all(int gem_fd, const intel_ctx_t *ctx,
 	memset(busy_class, 0, sizeof(busy_class));
 	memset(tval, 0, sizeof(tval));
 
+	gem_quiescent_gpu(gem_fd);
+
 	for_each_ctx_engine(gem_fd, ctx, e_) {
 		if (e->class == e_->class && e->instance == e_->instance) {
 			continue;
-- 
2.38.1



More information about the igt-dev mailing list