mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-12 00:43:04 +00:00
lib/gt: api polish for igt_can_hang_ring
Align with common igt library style: - Push the igt_require into the function. - Push the intel_gen into the function. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
@@ -474,7 +474,7 @@ static struct igt_hang_ring rcs_hang(void)
|
||||
|
||||
static void hang_require(void)
|
||||
{
|
||||
igt_require(igt_can_hang_ring(fd, gen, -1));
|
||||
igt_require_hang_ring(fd, -1);
|
||||
}
|
||||
|
||||
static void do_overwrite_source(const struct access_mode *mode,
|
||||
|
||||
@@ -239,7 +239,7 @@ igt_main
|
||||
igt_stop_signal_helper();
|
||||
|
||||
igt_subtest_f("%s-hang", t->name) {
|
||||
igt_require(igt_can_hang_ring(fd, batch->gen, -1));
|
||||
igt_require_hang_ring(fd, -1);
|
||||
do_test(fd, t->cache, src, start, dst, 1, bcs_hang);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,9 +263,7 @@ static void do_forked_test(int fd, unsigned flags)
|
||||
struct igt_helper_process thrasher = {};
|
||||
|
||||
if (flags & HANG)
|
||||
igt_require(igt_can_hang_ring(fd,
|
||||
intel_gen(devid),
|
||||
I915_EXEC_BLT));
|
||||
igt_require_hang_ring(fd, I915_EXEC_BLT);
|
||||
|
||||
if (flags & (THRASH | THRASH_INACTIVE)) {
|
||||
uint64_t val = (flags & THRASH_INACTIVE) ?
|
||||
@@ -328,7 +326,7 @@ igt_main
|
||||
do_test(fd, false, no_hang);
|
||||
|
||||
igt_subtest("interruptible-hang") {
|
||||
igt_require(igt_can_hang_ring(fd, intel_gen(devid), I915_EXEC_BLT));
|
||||
igt_require_hang_ring(fd, I915_EXEC_BLT);
|
||||
do_test(fd, false, bcs_hang);
|
||||
}
|
||||
|
||||
@@ -336,7 +334,7 @@ igt_main
|
||||
do_test(fd, true, no_hang);
|
||||
|
||||
igt_subtest("faulting-reloc-interruptible-hang") {
|
||||
igt_require(igt_can_hang_ring(fd, intel_gen(devid), I915_EXEC_BLT));
|
||||
igt_require_hang_ring(fd, I915_EXEC_BLT);
|
||||
do_test(fd, true, bcs_hang);
|
||||
}
|
||||
igt_stop_signal_helper();
|
||||
|
||||
Reference in New Issue
Block a user