drm/i915/selftests: Fix engine reset count storage for multi-tile
[ Upstream commit7c7c863bf8
] Engine->id namespace is per-tile so struct igt_live_test->reset_engine[] needs to be two-dimensional so engine reset counts from all tiles can be stored with no aliasing. With aliasing, if we had a real multi-tile platform, the reset counts would be incorrect for same engine instance on different tiles. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Fixes:0c29efa23f
("drm/i915/selftests: Consider multi-gt instead of to_gt()") Reported-by: Alan Previn Teres Alexis <alan.previn.teres.alexis@intel.com> Cc: Tejas Upadhyay <tejas.upadhyay@intel.com> Cc: Andi Shyti <andi.shyti@linux.intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231201122109.729006-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit0647ece381
) Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
83a42d791b
commit
54d08313a3
@ -37,8 +37,9 @@ int igt_live_test_begin(struct igt_live_test *t,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for_each_engine(engine, gt, id)
|
for_each_engine(engine, gt, id)
|
||||||
t->reset_engine[id] =
|
t->reset_engine[i][id] =
|
||||||
i915_reset_engine_count(&i915->gpu_error, engine);
|
i915_reset_engine_count(&i915->gpu_error,
|
||||||
|
engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
t->reset_global = i915_reset_count(&i915->gpu_error);
|
t->reset_global = i915_reset_count(&i915->gpu_error);
|
||||||
@ -66,14 +67,14 @@ int igt_live_test_end(struct igt_live_test *t)
|
|||||||
|
|
||||||
for_each_gt(gt, i915, i) {
|
for_each_gt(gt, i915, i) {
|
||||||
for_each_engine(engine, gt, id) {
|
for_each_engine(engine, gt, id) {
|
||||||
if (t->reset_engine[id] ==
|
if (t->reset_engine[i][id] ==
|
||||||
i915_reset_engine_count(&i915->gpu_error, engine))
|
i915_reset_engine_count(&i915->gpu_error, engine))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
gt_err(gt, "%s(%s): engine '%s' was reset %d times!\n",
|
gt_err(gt, "%s(%s): engine '%s' was reset %d times!\n",
|
||||||
t->func, t->name, engine->name,
|
t->func, t->name, engine->name,
|
||||||
i915_reset_engine_count(&i915->gpu_error, engine) -
|
i915_reset_engine_count(&i915->gpu_error, engine) -
|
||||||
t->reset_engine[id]);
|
t->reset_engine[i][id]);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#ifndef IGT_LIVE_TEST_H
|
#ifndef IGT_LIVE_TEST_H
|
||||||
#define IGT_LIVE_TEST_H
|
#define IGT_LIVE_TEST_H
|
||||||
|
|
||||||
|
#include "gt/intel_gt_defines.h" /* for I915_MAX_GT */
|
||||||
#include "gt/intel_engine.h" /* for I915_NUM_ENGINES */
|
#include "gt/intel_engine.h" /* for I915_NUM_ENGINES */
|
||||||
|
|
||||||
struct drm_i915_private;
|
struct drm_i915_private;
|
||||||
@ -17,7 +18,7 @@ struct igt_live_test {
|
|||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
unsigned int reset_global;
|
unsigned int reset_global;
|
||||||
unsigned int reset_engine[I915_NUM_ENGINES];
|
unsigned int reset_engine[I915_MAX_GT][I915_NUM_ENGINES];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user