Commit b6f68c10 authored by Ville Syrjälä's avatar Ville Syrjälä

tests/kms_mmio_vs_cs_flip: Count valid tests for all crtcs

Report SKIP only if none of the pipe/connector combos worked, instead of
trying to report for each pipe separately.
Signed-off-by: Ville Syrjälä's avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent 1b6eb414
...@@ -474,31 +474,37 @@ test_crtc(data_t *data, igt_output_t *output, enum pipe pipe) ...@@ -474,31 +474,37 @@ test_crtc(data_t *data, igt_output_t *output, enum pipe pipe)
} }
static void static void
run_plane_test_for_pipe(data_t *data, enum pipe pipe) run_plane_test(data_t *data)
{ {
igt_output_t *output; igt_output_t *output;
enum igt_plane plane = 1; /* testing with one sprite is enough */ enum igt_plane plane = 1; /* testing with one sprite is enough */
int valid_tests = 0; int valid_tests = 0;
enum pipe pipe;
igt_require(data->display.pipes[pipe].n_planes > 2);
for_each_connected_output(&data->display, output) { for_each_connected_output(&data->display, output) {
if (test_plane(data, output, pipe, plane)) for_each_pipe(&data->display, pipe) {
valid_tests++; igt_require(data->display.pipes[pipe].n_planes > 2);
if (test_plane(data, output, pipe, plane))
valid_tests++;
}
} }
igt_require_f(valid_tests, "no valid crtc/connector combinations found\n"); igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
} }
static void static void
run_crtc_test_for_pipe(data_t *data, enum pipe pipe) run_crtc_test(data_t *data)
{ {
igt_output_t *output; igt_output_t *output;
int valid_tests = 0; int valid_tests = 0;
enum pipe pipe;
for_each_connected_output(&data->display, output) { for_each_connected_output(&data->display, output) {
if (test_crtc(data, output, pipe)) for_each_pipe(&data->display, pipe) {
valid_tests++; if (test_crtc(data, output, pipe))
valid_tests++;
}
} }
igt_require_f(valid_tests, "no valid crtc/connector combinations found\n"); igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
...@@ -508,8 +514,6 @@ static data_t data; ...@@ -508,8 +514,6 @@ static data_t data;
igt_main igt_main
{ {
int pipe;
igt_skip_on_simulation(); igt_skip_on_simulation();
igt_fixture { igt_fixture {
...@@ -531,15 +535,11 @@ igt_main ...@@ -531,15 +535,11 @@ igt_main
gem_set_tiling(data.drm_fd, data.busy_bo->handle, 0, 4096); gem_set_tiling(data.drm_fd, data.busy_bo->handle, 0, 4096);
} }
igt_subtest_f("setplane_vs_cs_flip") { igt_subtest_f("setplane_vs_cs_flip")
for (pipe = 0; pipe < data.display.n_pipes; pipe++) run_plane_test(&data);
run_plane_test_for_pipe(&data, pipe);
}
igt_subtest_f("setcrtc_vs_cs_flip") { igt_subtest_f("setcrtc_vs_cs_flip")
for (pipe = 0; pipe < data.display.n_pipes; pipe++) run_crtc_test(&data);
run_crtc_test_for_pipe(&data, pipe);
}
igt_fixture { igt_fixture {
drm_intel_bo_unreference(data.busy_bo); drm_intel_bo_unreference(data.busy_bo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment