summaryrefslogtreecommitdiff
path: root/tests/kms_rotation_crc.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-01-23 15:45:01 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-12 13:13:25 +0100
commit99ad16b58253fe7df5e9468f4a1eefb381f2f2f7 (patch)
tree31b3be708052e1d8deeba1a568a4b895295a0aec /tests/kms_rotation_crc.c
parent7d48c0252c384d18318de89c54817bdfe9c832fc (diff)
tests/kms_rotation_crc: Fix bad-tiling testcase.
bad-tiling test didn't work, LOCAL_DRM_FORMAT_MODE_NONE == 0, so the fb was created with tiling = Y, but because test_bad_format was set but override_tiling wasn't, we fell through to the success case. Always assume failure if test_bad_format is set, and pass X tiled for fb, so the format override works. Also clear variables after subtests in main, so if the next subtest doesn't run we still clear the variables. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
Diffstat (limited to 'tests/kms_rotation_crc.c')
-rw-r--r--tests/kms_rotation_crc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 4f56d3d6..37e91184 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -411,7 +411,7 @@ static void __test_plane_rotation(data_t *data, int plane_type, bool test_bad_fo
igt_plane_set_size(plane, data->fb.height, data->fb.width);
ret = igt_display_try_commit2(display, commit);
- if (test_bad_format && (data->override_fmt || data->override_tiling)) {
+ if (test_bad_format) {
igt_assert_eq(ret, -EINVAL);
continue;
}
@@ -775,6 +775,7 @@ igt_main
test_plane_rotation(&data, subtest->plane);
}
}
+ data.flips = 0;
igt_subtest_f("sprite-rotation-90-pos-100-0") {
igt_require(gen >= 9);
@@ -783,23 +784,24 @@ igt_main
data.pos_y = 0;
test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
}
+ data.pos_x = 0,
+ data.pos_y = 0;
igt_subtest_f("bad-pixel-format") {
igt_require(gen >= 9);
- data.pos_x = 0,
- data.pos_y = 0;
data.rotation = IGT_ROTATION_90;
data.override_fmt = DRM_FORMAT_RGB565;
test_bad_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
}
+ data.override_fmt = 0;
igt_subtest_f("bad-tiling") {
igt_require(gen >= 9);
- data.override_fmt = 0;
data.rotation = IGT_ROTATION_90;
- data.override_tiling = LOCAL_DRM_FORMAT_MOD_NONE;
+ data.override_tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
test_bad_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
}
+ data.override_tiling = 0;
igt_subtest_f("primary-rotation-90-Y-tiled") {
enum pipe pipe;