public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_plane_multiple: Fix reference CRC
@ 2017-07-28 12:45 Mika Kahola
  2017-07-31  8:13 ` Daniel Vetter
  0 siblings, 1 reply; 10+ messages in thread
From: Mika Kahola @ 2017-07-28 12:45 UTC (permalink / raw)
  To: intel-gfx

When grabbing reference CRC with igt_pipe_crc_get_crcs() the number of
words in igt_crc_t structure was incorrectly collected. The fix here is
to switch to igt_pipe_crc_collect_crc() function when collecting CRC for
reference frame.

The problem was caught by CI system and at least affects on HSW platform.

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_plane_multiple.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index f6c6223..08f184a 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -110,7 +110,7 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe, bool atomic,
 {
 	drmModeModeInfo *mode;
 	igt_plane_t *primary;
-	int ret, n;
+	int ret;
 
 	igt_output_set_pipe(output, pipe);
 
@@ -131,9 +131,7 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe, bool atomic,
 				      atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 	igt_skip_on(ret != 0);
 
-	igt_pipe_crc_start(data->pipe_crc);
-	n = igt_pipe_crc_get_crcs(data->pipe_crc, 1, &crc);
-	igt_assert_eq(n, 1);
+	igt_pipe_crc_collect_crc(data->pipe_crc, crc);
 }
 
 /*
@@ -278,6 +276,8 @@ test_atomic_plane_position_with_output(data_t *data, enum pipe pipe,
 	test_grab_crc(data, output, pipe, true, &blue, tiling,
 		      &test.reference_crc);
 
+	igt_pipe_crc_start(data->pipe_crc);
+
 	i = 0;
 	while (i < iterations || loop_forever) {
 		prepare_planes(data, pipe, &blue, tiling, n_planes, output);
@@ -344,6 +344,8 @@ test_legacy_plane_position_with_output(data_t *data, enum pipe pipe,
 	test_grab_crc(data, output, pipe, false, &blue, tiling,
 		      &test.reference_crc);
 
+	igt_pipe_crc_start(data->pipe_crc);
+
 	i = 0;
 	while (i < iterations || loop_forever) {
 		prepare_planes(data, pipe, &blue, tiling, n_planes, output);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-08-02 13:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-28 12:45 [PATCH i-g-t] tests/kms_plane_multiple: Fix reference CRC Mika Kahola
2017-07-31  8:13 ` Daniel Vetter
2017-07-31  9:04   ` Kahola, Mika
2017-08-02 11:36     ` Daniel Vetter
2017-08-02 11:38       ` Lofstedt, Marta
2017-08-02 12:06       ` Mika Kahola
2017-08-02 12:16         ` Daniel Vetter
2017-08-02 12:22           ` Mika Kahola
2017-08-02 12:42             ` Petri Latvala
2017-08-02 13:18               ` Mika Kahola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox