[PATCH 15/17] [DEBUG] check whether engine reset actually happens

Robert Beckett bob.beckett at collabora.com
Wed Jun 29 19:23:23 UTC 2022


---
 drivers/gpu/drm/i915/gt/selftest_reset.c | 10 ++++++++--
 drivers/gpu/drm/i915/intel_region_ttm.c  |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_reset.c b/drivers/gpu/drm/i915/gt/selftest_reset.c
index 31fd1d830c60..ca130ccf63c7 100644
--- a/drivers/gpu/drm/i915/gt/selftest_reset.c
+++ b/drivers/gpu/drm/i915/gt/selftest_reset.c
@@ -179,8 +179,14 @@ __igt_reset_stolen(struct intel_gt *gt,
 		intel_gt_reset(gt, mask, NULL);
 	} else {
 		for_each_engine(engine, gt, id) {
-			if (mask & engine->mask)
-				intel_engine_reset(engine, NULL);
+			if (!(mask & engine->mask))
+				continue;
+			err = intel_engine_reset(engine, NULL);
+			if (err)
+				pr_err("BOB_DEBUG: %s(): intel_engine_reset(%px(name=%.8s id=%d), NULL) returned %d. intel_engine_uses_guc(%px)=%d\n",
+						__func__, engine, engine->name,
+						engine->id, err, engine,
+						intel_engine_uses_guc(engine));
 		}
 	}
 
diff --git a/drivers/gpu/drm/i915/intel_region_ttm.c b/drivers/gpu/drm/i915/intel_region_ttm.c
index a95aa84cdb7c..0122eeaf0071 100644
--- a/drivers/gpu/drm/i915/intel_region_ttm.c
+++ b/drivers/gpu/drm/i915/intel_region_ttm.c
@@ -303,6 +303,7 @@ bool intel_region_ttm_range_busy_debug(struct intel_memory_region *mem,
 	dummy = intel_region_ttm_resource_alloc(mem, size, start, start + size,
 						I915_BO_ALLOC_CONTIGUOUS);
 	if (IS_ERR(dummy)) {
+		memset(dbg, 0, sizeof(*dbg));
 		dbg->busy = true;
 		dbg->err = PTR_ERR(dummy);
 		return true;
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list