[igt-dev] [PATCH i-g-t] igt/kms_frontbuffer_tracking: Double check that the CRC collection is stable

Chris Wilson chris at chris-wilson.co.uk
Fri Sep 7 10:19:36 UTC 2018


Read the target CRCs a second and require that they do not change, as
otherwise we know that the collection of CRCs is unreliable.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/kms_frontbuffer_tracking.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index e9abceb66..8ef07e3ae 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1193,6 +1193,7 @@ static void collect_crc(igt_crc_t *crc)
 static void init_blue_crc(enum pixel_format format)
 {
 	struct igt_fb blue;
+	igt_crc_t check;
 
 	if (blue_crcs[format].initialized)
 		return;
@@ -1214,11 +1215,13 @@ static void init_blue_crc(enum pixel_format format)
 	}
 
 	collect_crc(&blue_crcs[format].crc);
-
 	print_crc("Blue CRC:  ", &blue_crcs[format].crc);
 
-	igt_display_reset(&drm.display);
+	/* Check the CRC collection HW is stable */
+	collect_crc(&check);
+	igt_require(igt_check_crc_equal(&blue_crcs[format].crc, &check));
 
+	igt_display_reset(&drm.display);
 	igt_remove_fb(drm.fd, &blue);
 
 	blue_crcs[format].initialized = true;
-- 
2.19.0.rc2



More information about the igt-dev mailing list