From fc96df538474a75ca00a4cbcd8ba1db93b70f08e Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 29 Jan 2018 14:38:32 +0100 Subject: 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 Reviewed-by: Mika Kahola Tested-by: Vidya Srinivas --- tests/kms_rotation_crc.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'tests') 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); } } -- cgit v1.2.3