summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>2017-06-09 17:08:53 -0400
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-06-16 16:16:14 +0300
commit597cae9b7e36b8d1f95a1102fd4aab9c2e3b18fe (patch)
tree0c8d1904efbcecc7362a8ec507556a6cbea42427 /tests
parent8ead46cb63b0f94a4e878df623332e311ac172ac (diff)
tests: Increase value of I915_MAX_PIPES to 6
Increasing max pipe count to 6 to support AMD GPU's. Since some tests' behavior depends on this value, small changes are made to remove this dependency: * kms_ccs: Early abort if wanted_pipe is out-of-bounds. * kms_concurrent: Check if pipe is within bounds first. * kms_pipe_color: Prevent skipping of subsequent tests by placing generated tests in a 'igt_subtest_group'. * kms_plane: Move pipe and plane index checking to subtest group level. v2: Change invalid pipe check on kmstest_pipe_name() to use I915_MAX_PIPE v3: Change tabs to spaces in 'enum pipe' Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Tested-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_ccs.c2
-rw-r--r--tests/kms_concurrent.c2
-rw-r--r--tests/kms_pipe_color.c3
-rw-r--r--tests/kms_plane.c8
4 files changed, 10 insertions, 5 deletions
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index d8291520..0795e3af 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -250,6 +250,8 @@ static void test(data_t *data)
int valid_tests = 0;
enum pipe wanted_pipe = data->pipe;
+ igt_skip_on(wanted_pipe >= display->n_pipes);
+
for_each_pipe_with_valid_output(display, data->pipe, data->output) {
if (wanted_pipe != PIPE_NONE && data->pipe != wanted_pipe)
continue;
diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index b34540b7..db06a374 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -351,8 +351,8 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
igt_fixture {
int valid_tests = 0;
- igt_require(data->display.pipes[pipe].n_planes > 0);
igt_skip_on(pipe >= data->display.n_pipes);
+ igt_require(data->display.pipes[pipe].n_planes > 0);
for_each_valid_output_on_pipe(&data->display, pipe, output)
valid_tests++;
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index fd58ac81..da49eb17 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -1180,7 +1180,8 @@ igt_main
}
for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++)
- run_tests_for_pipe(&data, pipe);
+ igt_subtest_group
+ run_tests_for_pipe(&data, pipe);
igt_subtest_f("invalid-lut-sizes")
invalid_lut_sizes(&data);
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index e1bd467b..34418cad 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -354,9 +354,6 @@ test_plane_panning(data_t *data, enum pipe pipe, int plane,
igt_output_t *output;
int connected_outs = 0;
- igt_skip_on(pipe >= data->display.n_pipes);
- igt_skip_on(plane >= data->display.pipes[pipe].n_planes);
-
for_each_valid_output_on_pipe(&data->display, pipe, output) {
test_plane_panning_with_output(data, pipe, plane, output,
flags);
@@ -369,6 +366,11 @@ test_plane_panning(data_t *data, enum pipe pipe, int plane,
static void
run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
{
+ igt_fixture {
+ igt_skip_on(pipe >= data->display.n_pipes);
+ igt_require(data->display.pipes[pipe].n_planes > 0);
+ }
+
igt_subtest_f("plane-position-covered-pipe-%s-planes",
kmstest_pipe_name(pipe)) {
int n_planes = data->display.pipes[pipe].n_planes;