[igt-dev] [RESEND, v3 4/5] kms_plane: Add a helper of capturing CRC with commit style

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Thu Sep 6 07:23:59 UTC 2018


As a legacy style commit does not allow changing of primary plane rotation
on non-first commit, it adds a helper of capturing CRC with commit style
argument for testing of primary plane rotation.

Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
 tests/kms_plane.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 3f48c821..3d08893f 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -61,8 +61,9 @@ static void test_fini(data_t *data)
 }
 
 static void
-test_grab_crc_for_fb(data_t *data, igt_output_t *output, enum pipe pipe,
-		     igt_fb_t *fb, igt_crc_t *crc /* out */)
+test_grab_crc_for_fb2(data_t *data, igt_output_t *output, enum pipe pipe,
+		      igt_fb_t *fb, igt_crc_t *crc /* out */,
+		      enum igt_commit_style s)
 {
 	igt_plane_t *primary;
 	char *crc_str;
@@ -74,7 +75,8 @@ test_grab_crc_for_fb(data_t *data, igt_output_t *output, enum pipe pipe,
 
 	igt_plane_set_fb(primary, fb);
 
-	ret = igt_display_try_commit2(&data->display, COMMIT_LEGACY);
+	ret = igt_display_try_commit2(&data->display, s);
+
 	igt_skip_on(ret != 0);
 
 	igt_pipe_crc_collect_crc(data->pipe_crc, crc);
@@ -86,6 +88,13 @@ test_grab_crc_for_fb(data_t *data, igt_output_t *output, enum pipe pipe,
 	free(crc_str);
 }
 
+static void
+test_grab_crc_for_fb(data_t *data, igt_output_t *output, enum pipe pipe,
+		     igt_fb_t *fb, igt_crc_t *crc /* out */)
+{
+	test_grab_crc_for_fb2(data, output, pipe, fb, crc, COMMIT_LEGACY);
+}
+
 static void
 test_create_fb_for_output(data_t *data, igt_output_t *output, color_t *fb_color,
 			  igt_fb_t *fb)
-- 
2.18.0



More information about the igt-dev mailing list