@@ -365,7 +365,8 @@ test_legacy_plane_position_with_output(data_t *data, enum pipe pipe,
}
static void
-test_plane_position(data_t *data, enum pipe pipe, bool atomic, uint64_t tiling)
+test_plane_position(data_t *data, enum pipe pipe, bool atomic,
+ bool force_test_atomic, uint64_t tiling)
{
igt_output_t *output;
int connected_outs;
@@ -379,6 +380,8 @@ test_plane_position(data_t *data, enum pipe pipe, bool atomic, uint64_t tiling)
tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED))
igt_require(AT_LEAST_GEN(devid, 9));
+ data->display.force_test_atomic = force_test_atomic;
+
if (!opt.user_seed)
opt.seed = time(NULL);
@@ -421,46 +424,71 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
igt_require(data->display.pipes[pipe].n_planes > 0);
}
-
igt_subtest_f("legacy-pipe-%s-tiling-none",
kmstest_pipe_name(pipe))
for_each_valid_output_on_pipe(&data->display, pipe, output)
- test_plane_position(data, pipe, false, LOCAL_DRM_FORMAT_MOD_NONE);
+ test_plane_position(data, pipe, false, false,
+ LOCAL_DRM_FORMAT_MOD_NONE);
igt_subtest_f("atomic-pipe-%s-tiling-none",
kmstest_pipe_name(pipe))
for_each_valid_output_on_pipe(&data->display, pipe, output)
- test_plane_position(data, pipe, true, LOCAL_I915_FORMAT_MOD_X_TILED);
+ test_plane_position(data, pipe, true, false,
+ LOCAL_I915_FORMAT_MOD_X_TILED);
igt_subtest_f("legacy-pipe-%s-tiling-x",
kmstest_pipe_name(pipe))
for_each_valid_output_on_pipe(&data->display, pipe, output)
- test_plane_position(data, pipe, false, LOCAL_I915_FORMAT_MOD_X_TILED);
+ test_plane_position(data, pipe, false, false,
+ LOCAL_I915_FORMAT_MOD_X_TILED);
igt_subtest_f("atomic-pipe-%s-tiling-x",
kmstest_pipe_name(pipe))
for_each_valid_output_on_pipe(&data->display, pipe, output)
- test_plane_position(data, pipe, true, LOCAL_I915_FORMAT_MOD_X_TILED);
+ test_plane_position(data, pipe, true, false,
+ LOCAL_I915_FORMAT_MOD_X_TILED);
igt_subtest_f("legacy-pipe-%s-tiling-y",
kmstest_pipe_name(pipe))
for_each_valid_output_on_pipe(&data->display, pipe, output)
- test_plane_position(data, pipe, false, LOCAL_I915_FORMAT_MOD_Y_TILED);
+ test_plane_position(data, pipe, false, false,
+ LOCAL_I915_FORMAT_MOD_Y_TILED);
igt_subtest_f("atomic-pipe-%s-tiling-y",
kmstest_pipe_name(pipe))
for_each_valid_output_on_pipe(&data->display, pipe, output)
- test_plane_position(data, pipe, true, LOCAL_I915_FORMAT_MOD_Y_TILED);
+ test_plane_position(data, pipe, true, false,
+ LOCAL_I915_FORMAT_MOD_Y_TILED);
igt_subtest_f("legacy-pipe-%s-tiling-yf",
kmstest_pipe_name(pipe))
for_each_valid_output_on_pipe(&data->display, pipe, output)
- test_plane_position(data, pipe, false, LOCAL_I915_FORMAT_MOD_Yf_TILED);
+ test_plane_position(data, pipe, false, false,
+ LOCAL_I915_FORMAT_MOD_Yf_TILED);
igt_subtest_f("atomic-pipe-%s-tiling-yf",
kmstest_pipe_name(pipe))
for_each_valid_output_on_pipe(&data->display, pipe, output)
- test_plane_position(data, pipe, true, LOCAL_I915_FORMAT_MOD_Yf_TILED);
+ test_plane_position(data, pipe, true, false,
+ LOCAL_I915_FORMAT_MOD_Yf_TILED);
+
+ igt_subtest_f("atomic-pipe-%s-tiling-x-with-test",
+ kmstest_pipe_name(pipe))
+ for_each_valid_output_on_pipe(&data->display, pipe, output)
+ test_plane_position(data, pipe, true, true,
+ LOCAL_I915_FORMAT_MOD_X_TILED);
+
+ igt_subtest_f("atomic-pipe-%s-tiling-y-with-test",
+ kmstest_pipe_name(pipe))
+ for_each_valid_output_on_pipe(&data->display, pipe, output)
+ test_plane_position(data, pipe, true, true,
+ LOCAL_I915_FORMAT_MOD_X_TILED);
+
+ igt_subtest_f("atomic-pipe-%s-tiling-yf-with-test",
+ kmstest_pipe_name(pipe))
+ for_each_valid_output_on_pipe(&data->display, pipe, output)
+ test_plane_position(data, pipe, true, true,
+ LOCAL_I915_FORMAT_MOD_X_TILED);
}
static data_t data;
Add TEST_ONLY flag to test atomic modesetting commits without actual real-life commit. v2: Use flag to indicate to test with TEST_ONLY flag with atomic commit v3: Moved force_test_atomic flag set to 'test_plane_position()' Signed-off-by: Mika Kahola <mika.kahola@intel.com> --- tests/kms_plane_multiple.c | 48 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-)