[igt-dev] [PATCH 2/2] tests/kms_bw: Run tests on available pipes only
Alex Hung
alex.hung at amd.com
Tue Dec 13 23:43:32 UTC 2022
This cleans up unnecessary skips during executions.
Signed-off-by: Alex Hung <alex.hung at amd.com>
---
tests/kms_bw.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/tests/kms_bw.c b/tests/kms_bw.c
index 27100587..ac801746 100644
--- a/tests/kms_bw.c
+++ b/tests/kms_bw.c
@@ -145,17 +145,9 @@ static void run_test_linear_tiling(data_t *data, int pipe, const drmModeModeInfo
igt_output_t *output;
struct igt_fb buffer[IGT_MAX_PIPES];
igt_crc_t zero, captured[IGT_MAX_PIPES];
- int i = 0, num_pipes = 0;
- enum pipe p;
+ int i = 0;
int ret;
- /* Cannot use igt_display_get_n_pipes() due to fused pipes on i915 where they do
- * not give the numver of valid crtcs and always return IGT_MAX_PIPES */
- for_each_pipe(display, p) num_pipes++;
-
- igt_skip_on_f(pipe > num_pipes,
- "ASIC does not have %d pipes\n", pipe);
-
test_init(data);
/* create buffers */
@@ -204,6 +196,7 @@ igt_main
{
data_t data;
int i = 0, j = 0;
+ enum pipe p;
memset(&data, 0, sizeof(data));
@@ -219,14 +212,13 @@ igt_main
}
- /* We're not using for_each_pipe_static because we need the
- * _amount_ of pipes */
- for (i = 0; i < IGT_MAX_PIPES; i++) {
+ for_each_pipe(&data.display, p) {
for (j = 0; j < ARRAY_SIZE(test_mode); j++) {
igt_subtest_f("linear-tiling-%d-displays-%s", i+1,
test_mode[j].name)
run_test_linear_tiling(&data, i, &test_mode[j]);
}
+ i++;
}
igt_fixture
--
2.38.1
More information about the igt-dev
mailing list