[PATCH i-g-t] tests/kms_frontbuffer_tracking: Try harder to collect CRC's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems that at least with GLK with MIPI/DSI display, the first collected
CRC is bogus. To fix this, try to collect two CRC's instead of one.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101309
Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx>
---
 tests/kms_frontbuffer_tracking.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index a068c8a..df7cc6e 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1239,8 +1239,18 @@ static void print_crc(const char *str, struct both_crcs *crc)
 
 static void collect_crcs(struct both_crcs *crcs, bool mandatory_sink_crc)
 {
-	igt_pipe_crc_collect_crc(pipe_crc, &crcs->pipe);
+	int n;
+	igt_crc_t *crc = NULL;
+
+	igt_pipe_crc_start(pipe_crc);
+	n = igt_pipe_crc_get_crcs(pipe_crc, 2, &crc);
+	igt_pipe_crc_stop(pipe_crc);
+	igt_assert(n > 0);
+	igt_assert_crc_equal(&crc[0], &crc[1]);
+	crcs->pipe = crc[0];
+
 	get_sink_crc(&crcs->sink, mandatory_sink_crc);
+	free(crc);
 }
 
 static void init_blue_crc(enum pixel_format format, bool mandatory_sink_crc)
-- 
2.7.4

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux