Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc
@ 2017-12-01 12:43 Arkadiusz Hiler
  2017-12-01 13:07 ` ✗ Fi.CI.BAT: warning for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2017-12-01 12:43 UTC (permalink / raw)
  To: intel-gfx

Compiler complained on crc_lowres and crc_hires2 being uninitialized
and indeed, display_commit_mode() seems to have intention of retruning
the value through the parameter that is only a single pointer.

This couses only the local copy of the pointer, the one inside
display_commit_mode(), to be overwritten.

Let's fix that!

Also add missing hires crc comparison (M. Kahola).

Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 tests/kms_plane_lowres.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 85d3145d..9cc9724c 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -127,7 +127,7 @@ test_fini(data_t *data, igt_output_t *output, enum pipe pipe)
 
 static int
 display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
-		    enum pipe pipe, int flags, igt_crc_t *crc)
+		    enum pipe pipe, int flags, igt_crc_t **crc)
 {
 	char buf[256];
 	struct drm_event *e = (void *)buf;
@@ -148,7 +148,7 @@ display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
 	igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
 	igt_reset_timeout();
 
-	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crc);
+	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, crc);
 	igt_assert_eq(n, vblank_stop - vblank_start);
 
 	return n;
@@ -252,7 +252,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 	check_mode(&mode_lowres, mode2);
 
-	display_commit_mode(&data->display, pipe_crc, pipe, flags, crc_lowres);
+	display_commit_mode(&data->display, pipe_crc, pipe, flags, &crc_lowres);
+	free(crc_lowres);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, false);
 
@@ -264,10 +265,15 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 	check_mode(mode1, mode3);
 
-	display_commit_mode(&data->display, pipe_crc, pipe, flags, crc_hires2);
+	display_commit_mode(&data->display, pipe_crc, pipe, flags, &crc_hires2);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, true);
 
+	igt_assert_crc_equal(crc_hires1, crc_hires2);
+
+	free(crc_hires1);
+	free(crc_hires2);
+
 	igt_pipe_crc_stop(pipe_crc);
 	igt_pipe_crc_free(pipe_crc);
 
-- 
2.13.6

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

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

end of thread, other threads:[~2017-12-12 15:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-01 12:43 [PATCH i-g-t] test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc Arkadiusz Hiler
2017-12-01 13:07 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-12-04 14:15 ` ✓ Fi.CI.BAT: success " Patchwork
2017-12-04 15:43 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-12 10:47 ` [PATCH i-g-t v2] " Arkadiusz Hiler
2017-12-12 10:59   ` [PATCH v3 i-g-t] " Maarten Lankhorst
2017-12-12 11:10     ` Petri Latvala
2017-12-12 12:10     ` Arkadiusz Hiler
2017-12-12 12:26       ` Arkadiusz Hiler
2017-12-12 13:19 ` ✓ Fi.CI.BAT: success for test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc (rev3) Patchwork
2017-12-12 15:52 ` ✗ Fi.CI.IGT: failure " Patchwork

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