summaryrefslogtreecommitdiff
path: root/tests/kms_rotation_crc.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-01-29 14:38:32 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-12 13:13:25 +0100
commitfc96df538474a75ca00a4cbcd8ba1db93b70f08e (patch)
tree342cbcde28e49fa3549cfbd524a64928955432c5 /tests/kms_rotation_crc.c
parent99ad16b58253fe7df5e9468f4a1eefb381f2f2f7 (diff)
tests/kms_rotation_crc: Move bad_format parameter to test_plane_rotation
Instead of 2 functions doing the same thing, consolidate to a single function. 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.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 37e91184..e8cdbfcc 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -356,7 +356,7 @@ static void wait_for_pageflip(int fd)
igt_assert(drmHandleEvent(fd, &evctx) == 0);
}
-static void __test_plane_rotation(data_t *data, int plane_type, bool test_bad_format)
+static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_format)
{
igt_display_t *display = &data->display;
igt_output_t *output;
@@ -456,16 +456,6 @@ static void __test_plane_rotation(data_t *data, int plane_type, bool test_bad_fo
igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
}
-static inline void test_bad_plane_rotation(data_t *data, int plane_type)
-{
- __test_plane_rotation(data, plane_type, true);
-}
-
-static inline void test_plane_rotation(data_t *data, int plane_type)
-{
- __test_plane_rotation(data, plane_type, false);
-}
-
static void test_plane_rotation_ytiled_obj(data_t *data,
igt_output_t *output,
int plane_type)
@@ -772,7 +762,7 @@ igt_main
gen >= 9);
data.rotation = subtest->rot;
data.flips = subtest->flips;
- test_plane_rotation(&data, subtest->plane);
+ test_plane_rotation(&data, subtest->plane, false);
}
}
data.flips = 0;
@@ -782,7 +772,7 @@ igt_main
data.rotation = IGT_ROTATION_90;
data.pos_x = 100,
data.pos_y = 0;
- test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
+ test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY, false);
}
data.pos_x = 0,
data.pos_y = 0;
@@ -791,7 +781,7 @@ igt_main
igt_require(gen >= 9);
data.rotation = IGT_ROTATION_90;
data.override_fmt = DRM_FORMAT_RGB565;
- test_bad_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+ test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, true);
}
data.override_fmt = 0;
@@ -799,7 +789,7 @@ igt_main
igt_require(gen >= 9);
data.rotation = IGT_ROTATION_90;
data.override_tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
- test_bad_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+ test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, true);
}
data.override_tiling = 0;
@@ -834,7 +824,7 @@ igt_main
data.rotation = (IGT_REFLECT_X | reflect_x->rot);
data.override_tiling = reflect_x->tiling;
data.flips = reflect_x->flips;
- test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+ test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, false);
}
}