All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2 1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/
@ 2021-10-20 10:16 Ville Syrjala
  2021-10-20 10:16 ` [igt-dev] [PATCH i-g-t v2 2/3] tests/crc: s/"auto"/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ville Syrjala @ 2021-10-20 10:16 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The "auto" crc source should be a drm wide thing by now.
Replace the INTEL_ prefix with IGT_.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_debugfs.c                     | 4 ++--
 lib/igt_debugfs.h                     | 2 +-
 tests/amdgpu/amd_color.c              | 2 +-
 tests/amdgpu/amd_max_bpc.c            | 2 +-
 tests/i915/gem_pxp.c                  | 3 ++-
 tests/i915/kms_big_fb.c               | 4 ++--
 tests/i915/kms_ccs.c                  | 3 ++-
 tests/i915/kms_draw_crc.c             | 2 +-
 tests/i915/kms_fbcon_fbt.c            | 2 +-
 tests/i915/kms_flip_scaled_crc.c      | 2 +-
 tests/i915/kms_flip_tiling.c          | 3 ++-
 tests/i915/kms_frontbuffer_tracking.c | 3 ++-
 tests/i915/kms_mmap_write_crc.c       | 2 +-
 tests/i915/kms_pwrite_crc.c           | 2 +-
 tests/kms_async_flips.c               | 2 +-
 tests/kms_atomic.c                    | 2 +-
 tests/kms_atomic_transition.c         | 3 ++-
 tests/kms_color.c                     | 2 +-
 tests/kms_cursor_crc.c                | 2 +-
 tests/kms_cursor_edge_walk.c          | 2 +-
 tests/kms_cursor_legacy.c             | 6 ++++--
 tests/kms_hdr.c                       | 2 +-
 tests/kms_multipipe_modeset.c         | 2 +-
 tests/kms_pipe_crc_basic.c            | 8 +++++---
 tests/kms_plane.c                     | 3 ++-
 tests/kms_plane_alpha_blend.c         | 3 ++-
 tests/kms_plane_cursor.c              | 2 +-
 tests/kms_plane_lowres.c              | 2 +-
 tests/kms_plane_multiple.c            | 3 ++-
 tests/kms_prime.c                     | 3 ++-
 tests/kms_rotation_crc.c              | 5 +++--
 tests/kms_universal_plane.c           | 3 ++-
 tools/intel_display_crc.c             | 3 ++-
 33 files changed, 55 insertions(+), 39 deletions(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index a5bb95ca32f7..5ead8aa55e03 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -715,7 +715,7 @@ pipe_crc_new(int fd, enum pipe pipe, const char *source, int flags)
  *
  * Returns: A pipe CRC object for the given @pipe and @source. The library
  * assumes that the source is always available since recent kernels support at
- * least INTEL_PIPE_CRC_SOURCE_AUTO everywhere.
+ * least IGT_PIPE_CRC_SOURCE_AUTO everywhere.
  */
 igt_pipe_crc_t *
 igt_pipe_crc_new(int fd, enum pipe pipe, const char *source)
@@ -733,7 +733,7 @@ igt_pipe_crc_new(int fd, enum pipe pipe, const char *source)
  *
  * Returns: A pipe CRC object for the given @pipe and @source. The library
  * assumes that the source is always available since recent kernels support at
- * least INTEL_PIPE_CRC_SOURCE_AUTO everywhere.
+ * least IGT_PIPE_CRC_SOURCE_AUTO everywhere.
  */
 igt_pipe_crc_t *
 igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, const char *source)
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index d43ba6c6c7a3..cef456587641 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -83,7 +83,7 @@ typedef struct {
 	uint32_t crc[DRM_MAX_CRC_NR];
 } igt_crc_t;
 
-#define INTEL_PIPE_CRC_SOURCE_AUTO "auto"
+#define IGT_PIPE_CRC_SOURCE_AUTO "auto"
 #define AMDGPU_PIPE_CRC_SOURCE_DPRX "dprx"
 
 bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index);
diff --git a/tests/amdgpu/amd_color.c b/tests/amdgpu/amd_color.c
index 6d313bae74b5..defe57bd4fb8 100644
--- a/tests/amdgpu/amd_color.c
+++ b/tests/amdgpu/amd_color.c
@@ -192,7 +192,7 @@ static void test_init(data_t *data)
 		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
 
 	data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_output_set_pipe(data->output, data->pipe_id);
 
diff --git a/tests/amdgpu/amd_max_bpc.c b/tests/amdgpu/amd_max_bpc.c
index 4eb759ee219a..8d2520b23512 100644
--- a/tests/amdgpu/amd_max_bpc.c
+++ b/tests/amdgpu/amd_max_bpc.c
@@ -126,7 +126,7 @@ static void test_init(data_t *data)
 		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
 
 	data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_output_set_pipe(data->output, data->pipe_id);
 
diff --git a/tests/i915/gem_pxp.c b/tests/i915/gem_pxp.c
index 5f269bab9041..0678476827fd 100644
--- a/tests/i915/gem_pxp.c
+++ b/tests/i915/gem_pxp.c
@@ -1110,7 +1110,8 @@ static void test_display_protected_crc(int i915, igt_display_t *display)
 	for_each_connected_output(display, output) {
 		mode = igt_output_get_mode(output);
 		pipe = &display->pipes[output->pending_pipe];
-		pipe_crc = igt_pipe_crc_new(i915, pipe->pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+		pipe_crc = igt_pipe_crc_new(i915, pipe->pipe,
+					    IGT_PIPE_CRC_SOURCE_AUTO);
 		plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
 		igt_require(igt_pipe_connector_valid(pipe->pipe, output));
 		igt_output_set_pipe(output, pipe->pipe);
diff --git a/tests/i915/kms_big_fb.c b/tests/i915/kms_big_fb.c
index 8665903827d8..e7a7eb16d576 100644
--- a/tests/i915/kms_big_fb.c
+++ b/tests/i915/kms_big_fb.c
@@ -453,7 +453,7 @@ static bool test_pipe(data_t *data)
 			    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	for_each_plane_on_pipe(&data->display, data->pipe, data->plane) {
 		ret = test_plane(data);
@@ -510,7 +510,7 @@ max_hw_stride_async_flip_test(data_t *data)
 	generate_pattern(data, &data->big_fb_flip[1], 640, 480);
 
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 	igt_pipe_crc_start(data->pipe_crc);
 
 	igt_set_timeout(5, "Async pageflipping loop got stuck!\n");
diff --git a/tests/i915/kms_ccs.c b/tests/i915/kms_ccs.c
index 716be5b6539b..0ae64378f517 100644
--- a/tests/i915/kms_ccs.c
+++ b/tests/i915/kms_ccs.c
@@ -532,7 +532,8 @@ static int test_ccs(data_t *data)
 	enum test_fb_flags fb_flags = 0;
 
 	if (data->flags & TEST_CRC) {
-		data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+		data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
+						  IGT_PIPE_CRC_SOURCE_AUTO);
 
 		if (try_config(data, fb_flags | FB_COMPRESSED, &ref_crc) &&
 		    try_config(data, fb_flags, &crc)) {
diff --git a/tests/i915/kms_draw_crc.c b/tests/i915/kms_draw_crc.c
index 82c368e1dc39..7433b334c335 100644
--- a/tests/i915/kms_draw_crc.c
+++ b/tests/i915/kms_draw_crc.c
@@ -274,7 +274,7 @@ static void setup_environment(void)
 
 	find_modeset_params();
 	pipe_crc = igt_pipe_crc_new(drm_fd, kmstest_get_crtc_idx(drm_res, ms.crtc_id),
-				    INTEL_PIPE_CRC_SOURCE_AUTO);
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 }
 
 static void teardown_environment(void)
diff --git a/tests/i915/kms_fbcon_fbt.c b/tests/i915/kms_fbcon_fbt.c
index 98c452c4f097..831ec867aefb 100644
--- a/tests/i915/kms_fbcon_fbt.c
+++ b/tests/i915/kms_fbcon_fbt.c
@@ -119,7 +119,7 @@ static bool fbc_check_cursor_blinking(struct drm_info *drm)
 	bool ret;
 	int i;
 
-	pipe_crc = igt_pipe_crc_new(drm->fd, PIPE_A, INTEL_PIPE_CRC_SOURCE_AUTO);
+	pipe_crc = igt_pipe_crc_new(drm->fd, PIPE_A, IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_pipe_crc_start(pipe_crc);
 	igt_pipe_crc_drain(pipe_crc);
diff --git a/tests/i915/kms_flip_scaled_crc.c b/tests/i915/kms_flip_scaled_crc.c
index 24ca12241be1..8fce41151ce0 100644
--- a/tests/i915/kms_flip_scaled_crc.c
+++ b/tests/i915/kms_flip_scaled_crc.c
@@ -215,7 +215,7 @@ static enum subrval test_flip_to_scaled(data_t *data, uint32_t index,
 		igt_pipe_crc_free(data->pipe_crc);
 	}
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	for (int i = 0; i < output->config.connector->count_modes; i++) {
 		if (output->config.connector->modes[i].hdisplay == data->attemptmodewidth &&
diff --git a/tests/i915/kms_flip_tiling.c b/tests/i915/kms_flip_tiling.c
index 913657993a21..4528459ce5bf 100644
--- a/tests/i915/kms_flip_tiling.c
+++ b/tests/i915/kms_flip_tiling.c
@@ -57,7 +57,8 @@ static void pipe_crc_new(data_t *data, int pipe)
 	if (data->pipe_crc)
 		return;
 
-	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 	igt_assert(data->pipe_crc);
 	igt_pipe_crc_start(data->pipe_crc);
 }
diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index d6a884926c48..3805ebbaa625 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -1223,7 +1223,8 @@ static void init_blue_crc(enum pixel_format format, enum tiling_type tiling)
 	igt_display_commit(&drm.display);
 
 	if (!pipe_crc) {
-		pipe_crc = igt_pipe_crc_new(drm.fd, prim_mode_params.pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+		pipe_crc = igt_pipe_crc_new(drm.fd, prim_mode_params.pipe,
+					    IGT_PIPE_CRC_SOURCE_AUTO);
 		igt_assert(pipe_crc);
 	}
 
diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c
index b17e5fdb6fb7..74b8942ed10e 100644
--- a/tests/i915/kms_mmap_write_crc.c
+++ b/tests/i915/kms_mmap_write_crc.c
@@ -188,7 +188,7 @@ static void prepare_crtc(data_t *data)
 		igt_pipe_crc_free(data->pipe_crc);
 
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	/* get reference crc for the white fb */
 	igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
diff --git a/tests/i915/kms_pwrite_crc.c b/tests/i915/kms_pwrite_crc.c
index 44fcfadbe6f5..2e33e5996e6d 100644
--- a/tests/i915/kms_pwrite_crc.c
+++ b/tests/i915/kms_pwrite_crc.c
@@ -125,7 +125,7 @@ static void prepare_crtc(data_t *data)
 		igt_pipe_crc_free(data->pipe_crc);
 
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	/* get reference crc for the white fb */
 	igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index 4ff7a196a725..95669c8655a4 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -488,7 +488,7 @@ static void test_crc(data_t *data)
 
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd,
 					  kmstest_get_pipe_from_crtc_id(data->drm_fd, data->crtc_id),
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_pipe_crc_start(data->pipe_crc);
 	igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc);
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index 1657624e93a8..c10fb2bcded8 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -407,7 +407,7 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
 
 	/* create the pipe_crc object for this pipe */
 	pipe_crc = igt_pipe_crc_new(pipe->display->drm_fd, pipe->pipe,
-				    INTEL_PIPE_CRC_SOURCE_AUTO);
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 
 	/* get reference crc */
 	igt_pipe_crc_start(pipe_crc);
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 4be24f9e3091..a9f2be7bd9ae 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -817,7 +817,8 @@ retry:
 		j += 1;
 
 		if (is_i915_device(data->drm_fd))
-			pipe_crcs[i] = igt_pipe_crc_new(data->drm_fd, i, INTEL_PIPE_CRC_SOURCE_AUTO);
+			pipe_crcs[i] = igt_pipe_crc_new(data->drm_fd, i,
+							IGT_PIPE_CRC_SOURCE_AUTO);
 
 		for_each_valid_output_on_pipe(&data->display, i, output) {
 			if (output->pending_pipe != PIPE_NONE)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 775f35964f61..90e94f19e2db 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -683,7 +683,7 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 
 		data->pipe_crc = igt_pipe_crc_new(data->drm_fd,
 						  primary->pipe->pipe,
-						  INTEL_PIPE_CRC_SOURCE_AUTO);
+						  IGT_PIPE_CRC_SOURCE_AUTO);
 
 		igt_display_require_output_on_pipe(&data->display, p);
 	}
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 513c97153e63..8bc767cde0b0 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -493,7 +493,7 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
 	if (data->pipe_crc)
 		igt_pipe_crc_free(data->pipe_crc);
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	/* x/y position where the cursor is still fully visible */
 	data->left = 0;
diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
index cce562e0e7eb..29ff216767fd 100644
--- a/tests/kms_cursor_edge_walk.c
+++ b/tests/kms_cursor_edge_walk.c
@@ -255,7 +255,7 @@ static void prepare_crtc(data_t *data)
 
 	/* create the pipe_crc object for this pipe */
 	data->pipe_crc = igt_pipe_crc_new_nonblock(data->drm_fd, data->pipe,
-						   INTEL_PIPE_CRC_SOURCE_AUTO);
+						   IGT_PIPE_CRC_SOURCE_AUTO);
 
 	/* get reference crc w/o cursor */
 	igt_pipe_crc_start(data->pipe_crc);
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 8136280701e6..c6402690c06f 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -1281,7 +1281,8 @@ static void flip_vs_cursor_crc(igt_display_t *display, bool atomic)
 
 	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 
-	pipe_crc = igt_pipe_crc_new(display->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	pipe_crc = igt_pipe_crc_new(display->drm_fd, pipe,
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 
 	set_cursor_on_pipe(display, pipe, &cursor_fb);
 	igt_display_commit2(display, COMMIT_UNIVERSAL);
@@ -1341,7 +1342,8 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
 
 	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 
-	pipe_crc = igt_pipe_crc_new(display->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	pipe_crc = igt_pipe_crc_new(display->drm_fd, pipe,
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 
 	set_cursor_on_pipe(display, pipe, &cursor_fb);
 	igt_display_commit2(display, COMMIT_UNIVERSAL);
diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index 273263db3672..70bcc855fed5 100644
--- a/tests/kms_hdr.c
+++ b/tests/kms_hdr.c
@@ -165,7 +165,7 @@ static void prepare_test(data_t *data, igt_output_t *output, enum pipe pipe)
 		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
 
 	data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_output_set_pipe(data->output, data->pipe_id);
 
diff --git a/tests/kms_multipipe_modeset.c b/tests/kms_multipipe_modeset.c
index 6358d9306bc6..1fdfb9a9f7a2 100644
--- a/tests/kms_multipipe_modeset.c
+++ b/tests/kms_multipipe_modeset.c
@@ -67,7 +67,7 @@ static void run_test(data_t *data, int valid_outputs)
 		mode = NULL;
 
 		pipe_crcs[i] = igt_pipe_crc_new(display->drm_fd, i,
-						INTEL_PIPE_CRC_SOURCE_AUTO);
+						IGT_PIPE_CRC_SOURCE_AUTO);
 
 		igt_output_set_pipe(output, i);
 		mode = igt_output_get_mode(output);
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 0861c46dbd9b..ebfa68d4c1be 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -104,7 +104,8 @@ static void test_read_crc(data_t *data, enum pipe pipe, unsigned flags)
 		if (flags & TEST_NONBLOCK) {
 			igt_pipe_crc_t *pipe_crc;
 
-			pipe_crc = igt_pipe_crc_new_nonblock(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+			pipe_crc = igt_pipe_crc_new_nonblock(data->drm_fd, pipe,
+							     IGT_PIPE_CRC_SOURCE_AUTO);
 			igt_wait_for_vblank(data->drm_fd, display->pipes[pipe].crtc_offset);
 			igt_pipe_crc_start(pipe_crc);
 
@@ -119,7 +120,8 @@ static void test_read_crc(data_t *data, enum pipe pipe, unsigned flags)
 		} else {
 			igt_pipe_crc_t *pipe_crc;
 
-			pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+			pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
+						    IGT_PIPE_CRC_SOURCE_AUTO);
 			igt_pipe_crc_start(pipe_crc);
 
 			n_crcs = igt_pipe_crc_get_crcs(pipe_crc, N_CRCS, &crcs);
@@ -203,7 +205,7 @@ static void test_compare_crc(data_t *data, enum pipe pipe)
 	igt_display_commit(display);
 
 	pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
-				    INTEL_PIPE_CRC_SOURCE_AUTO);
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 	igt_pipe_crc_collect_crc(pipe_crc, &ref_crc);
 
 	/* Flip FB1 with the Primary plane & compare the CRC with ref CRC. */
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 405d4c2180a6..0773cbb4e135 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -74,7 +74,8 @@ static color_t blue  = { 0.0f, 0.0f, 1.0f };
  */
 static void test_init(data_t *data, enum pipe pipe)
 {
-	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 }
 
 static void test_fini(data_t *data)
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 9e4ee22b43af..afbe0b1b1fd3 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -162,7 +162,8 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe)
 
 	/* create the pipe_crc object for this pipe */
 	igt_pipe_crc_free(data->pipe_crc);
-	data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	mode = igt_output_get_mode(output);
 	w = mode->hdisplay;
diff --git a/tests/kms_plane_cursor.c b/tests/kms_plane_cursor.c
index 9bda47466446..aeaf3e1e1e22 100644
--- a/tests/kms_plane_cursor.c
+++ b/tests/kms_plane_cursor.c
@@ -77,7 +77,7 @@ static void test_init(data_t *data, enum pipe pipe_id)
 	data->cursor = igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_CURSOR);
 
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe_id,
-					  INTEL_PIPE_CRC_SOURCE_AUTO);
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_output_set_pipe(data->output, data->pipe_id);
 
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 6c0fce86e56e..9bc860435f5c 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -192,7 +192,7 @@ test_planes_on_pipe_with_output(data_t *data, igt_plane_t *plane, uint64_t modif
 	create_ref_fb(data, modifier, &mode_lowres, &data->ref_lowres.fb);
 
 	pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
-				    INTEL_PIPE_CRC_SOURCE_AUTO);
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_output_override_mode(data->output, &mode_lowres);
 	igt_plane_set_fb(primary, &data->ref_lowres.fb);
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index ece00097e87b..3833fc2cadf0 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -68,7 +68,8 @@ struct {
  */
 static void test_init(data_t *data, enum pipe pipe, int n_planes)
 {
-	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	data->plane = calloc(n_planes, sizeof(*data->plane));
 	igt_assert_f(data->plane != NULL, "Failed to allocate memory for planes\n");
diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 1ad4b3a638f5..4cd52c69f88b 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -206,7 +206,8 @@ static void test_crc(int exporter_fd, int importer_fd)
 	output = setup_display(importer_fd, &display, &pipe);
 
 	mode = igt_output_get_mode(output);
-	pipe_crc = igt_pipe_crc_new(importer_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	pipe_crc = igt_pipe_crc_new(importer_fd, pipe,
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 
 	for (i = 0; i < ARRAY_SIZE(colors); i++) {
 		prepare_scratch(exporter_fd, &scratch, mode, colors[i].color);
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index ae477b6044a2..620fd58001a1 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -208,7 +208,8 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
 	 */
 	if (!is_amdgpu_device(data->gfx_fd))
 		igt_display_commit2(display, COMMIT_ATOMIC);
-	data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
+				          IGT_PIPE_CRC_SOURCE_AUTO);
 
 	if (!is_amdgpu_device(data->gfx_fd) && start_crc)
 		igt_pipe_crc_start(data->pipe_crc);
@@ -710,7 +711,7 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
 		p[1].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
 
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
-						  INTEL_PIPE_CRC_SOURCE_AUTO);
+						  IGT_PIPE_CRC_SOURCE_AUTO);
 		igt_pipe_crc_start(data->pipe_crc);
 
 		for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 2e8958979dd6..0ad2f57485bf 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -68,7 +68,8 @@ functional_test_init(functional_test_t *test, igt_output_t *output, enum pipe pi
 	data_t *data = test->data;
 	drmModeModeInfo *mode;
 
-	test->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	test->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_output_set_pipe(output, pipe);
 
diff --git a/tools/intel_display_crc.c b/tools/intel_display_crc.c
index d1b28ea77371..61291fc2aa88 100644
--- a/tools/intel_display_crc.c
+++ b/tools/intel_display_crc.c
@@ -67,7 +67,8 @@ static void print_crcs(display_crc_t *ctx)
 	char *crc_str;
 	int i;
 
-	pipe_crc = igt_pipe_crc_new(ctx->fd, ctx->pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
+	pipe_crc = igt_pipe_crc_new(ctx->fd, ctx->pipe,
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 
 	for (i = 0; i < ctx->n_crcs; i++) {
 		igt_pipe_crc_collect_crc(pipe_crc, &crc);
-- 
2.32.0

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

* [igt-dev] [PATCH i-g-t v2 2/3] tests/crc: s/"auto"/IGT_PIPE_CRC_SOURCE_AUTO/
  2021-10-20 10:16 [igt-dev] [PATCH i-g-t v2 1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
@ 2021-10-20 10:16 ` Ville Syrjala
  2021-10-20 10:16 ` [igt-dev] [PATCH i-g-t v2 3/3] lib/crc: Move pipe CRC stuff out from igt_debugfs Ville Syrjala
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Ville Syrjala @ 2021-10-20 10:16 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Replace the hand rolled "auto" string with the
define we have for it.

Simple cocci job:
@@
@@
 igt_pipe_crc_new(...,
- "auto"
+ IGT_PIPE_CRC_SOURCE_AUTO
 )

Suggested-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/amdgpu/amd_hotplug.c       | 3 ++-
 tests/amdgpu/amd_link_settings.c | 3 ++-
 tests/kms_bw.c                   | 3 ++-
 tests/kms_pipe_crc_basic.c       | 3 ++-
 tests/nouveau_crc.c              | 7 ++++---
 5 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/tests/amdgpu/amd_hotplug.c b/tests/amdgpu/amd_hotplug.c
index 7e6b63db6323..736040a2c18e 100644
--- a/tests/amdgpu/amd_hotplug.c
+++ b/tests/amdgpu/amd_hotplug.c
@@ -59,7 +59,8 @@ static void test_init(data_t *data)
 		data->cursor[i] = igt_pipe_get_plane_type(
 			data->pipe[i], DRM_PLANE_TYPE_CURSOR);
 		data->pipe_crc[i] =
-			igt_pipe_crc_new(data->fd, data->pipe_id[i], "auto");
+			igt_pipe_crc_new(data->fd, data->pipe_id[i],
+					 IGT_PIPE_CRC_SOURCE_AUTO);
 	}
 
 	for (i = 0, n = 0; i < display->n_outputs && n < max_pipes; ++i) {
diff --git a/tests/amdgpu/amd_link_settings.c b/tests/amdgpu/amd_link_settings.c
index 7822683d1ab2..1ea82fd76926 100644
--- a/tests/amdgpu/amd_link_settings.c
+++ b/tests/amdgpu/amd_link_settings.c
@@ -116,7 +116,8 @@ static void test_init(data_t *data, igt_output_t *output)
 	igt_require(data->pipe_id != PIPE_NONE);
 
 	data->pipe = &data->display.pipes[data->pipe_id];
-	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe_id, "auto");
+	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe_id,
+					  IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_output_set_pipe(output, data->pipe_id);
 
diff --git a/tests/kms_bw.c b/tests/kms_bw.c
index a4553cdee5ba..8dd6b8bd0fa2 100644
--- a/tests/kms_bw.c
+++ b/tests/kms_bw.c
@@ -82,7 +82,8 @@ static void test_init(data_t *data)
 		data->primary[i] = igt_pipe_get_plane_type(
 			data->pipe[i], DRM_PLANE_TYPE_PRIMARY);
 		data->pipe_crc[i] =
-			igt_pipe_crc_new(data->fd, data->pipe_id[i], "auto");
+			igt_pipe_crc_new(data->fd, data->pipe_id[i],
+					 IGT_PIPE_CRC_SOURCE_AUTO);
 	}
 
 	for (i = 0; i < display->n_outputs && i < max_pipes; i++) {
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index ebfa68d4c1be..b27b314832ff 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -237,7 +237,8 @@ static void test_disable_crc_after_crtc(data_t *data, enum pipe pipe)
 	igt_display_require_output_on_pipe(display, pipe);
 	output = igt_get_single_output_for_pipe(display, pipe);
 
-	pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, "auto");
+	pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 
 	igt_display_reset(display);
 	igt_output_set_pipe(output, pipe);
diff --git a/tests/nouveau_crc.c b/tests/nouveau_crc.c
index 076cbda40ade..785d39bde6c6 100644
--- a/tests/nouveau_crc.c
+++ b/tests/nouveau_crc.c
@@ -122,7 +122,8 @@ static void test_ctx_flip_detection(data_t *data)
 	int start = -1, frame, start_color = -1, i;
 	bool found_skip = false;
 
-	pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe, "auto");
+	pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
+				    IGT_PIPE_CRC_SOURCE_AUTO);
 
 	create_crc_colors(data, colors, n_colors, pipe_crc);
 
@@ -232,7 +233,7 @@ static void test_ctx_flip_skip_current_frame(data_t *data)
 	const int n_colors = ARRAY_SIZE(colors);
 	const int n_crcs = 30;
 
-	pipe_crc = igt_pipe_crc_new(fd, data->pipe, "auto");
+	pipe_crc = igt_pipe_crc_new(fd, data->pipe, IGT_PIPE_CRC_SOURCE_AUTO);
 	create_crc_colors(data, colors, n_colors, pipe_crc);
 
 	set_crc_flip_threshold(data, 5);
@@ -264,7 +265,7 @@ static void test_ctx_flip_threshold_reset_after_capture(data_t *data)
 	igt_pipe_crc_t *pipe_crc;
 	const int fd = data->drm_fd;
 
-	pipe_crc = igt_pipe_crc_new(fd, data->pipe, "auto");
+	pipe_crc = igt_pipe_crc_new(fd, data->pipe, IGT_PIPE_CRC_SOURCE_AUTO);
 
 	set_crc_flip_threshold(data, 5);
 	igt_pipe_crc_start(pipe_crc);
-- 
2.32.0

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

* [igt-dev] [PATCH i-g-t v2 3/3] lib/crc: Move pipe CRC stuff out from igt_debugfs
  2021-10-20 10:16 [igt-dev] [PATCH i-g-t v2 1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
  2021-10-20 10:16 ` [igt-dev] [PATCH i-g-t v2 2/3] tests/crc: s/"auto"/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
@ 2021-10-20 10:16 ` Ville Syrjala
  2021-10-20 10:39   ` Petri Latvala
  2021-10-20 11:13 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/ Patchwork
  2021-10-20 13:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  3 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjala @ 2021-10-20 10:16 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

No reason to hide the pipe CRC code inside the debugfs stuff.
The fact that pipe CRCs are operated through debugfs is just
an irrelevant implementation detail.

Fixed up the few cases that don't include igt.h with this cocci:
@find@
identifier ID;
@@
igt_crc_t ID;

@has_include@
@@
(
 #include "igt_pipe_crc.h"
|
 #include "igt.h"
)

@depends on find && !has_include@
@@
  #include "igt_kms.h"
+ #include "igt_pipe_crc.h"

v2: better cocci to catch lib/igt_chamelium.c

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt.h                       |   1 +
 lib/igt_chamelium.c             |   1 +
 lib/igt_chamelium.h             |   1 +
 lib/igt_debugfs.c               | 558 -----------------------------
 lib/igt_debugfs.h               |  57 ---
 lib/igt_fb.h                    |   1 +
 lib/igt_pipe_crc.c              | 602 ++++++++++++++++++++++++++++++++
 lib/igt_pipe_crc.h              |  91 +++++
 lib/meson.build                 |   1 +
 tests/i915/kms_mmap_write_crc.c |   1 +
 tools/intel_display_crc.c       |   1 +
 11 files changed, 700 insertions(+), 615 deletions(-)
 create mode 100644 lib/igt_pipe_crc.c
 create mode 100644 lib/igt_pipe_crc.h

diff --git a/lib/igt.h b/lib/igt.h
index 0bf98aa5d767..014714b92950 100644
--- a/lib/igt.h
+++ b/lib/igt.h
@@ -38,6 +38,7 @@
 #include "igt_gt.h"
 #include "igt_kms.h"
 #include "igt_params.h"
+#include "igt_pipe_crc.h"
 #include "igt_pm.h"
 #include "igt_stats.h"
 #ifdef HAVE_CHAMELIUM
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index b4d838bbdb29..2b523a6a2c0c 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -43,6 +43,7 @@
 #include "igt_frame.h"
 #include "igt_list.h"
 #include "igt_kms.h"
+#include "igt_pipe_crc.h"
 #include "igt_rc.h"
 
 /**
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index f40e848e4f67..af88fec914bd 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -36,6 +36,7 @@
 
 struct igt_fb;
 struct edid;
+typedef struct _igt_crc igt_crc_t;
 
 struct chamelium;
 struct chamelium_port;
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 5ead8aa55e03..4da05cac1a61 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -53,24 +53,6 @@
  * basic functions to access debugfs files with e.g. igt_debugfs_open() it also
  * provides higher-level wrappers for some debugfs features.
  *
- * # Pipe CRC Support
- *
- * This library wraps up the kernel's support for capturing pipe CRCs into a
- * neat and tidy package. For the detailed usage see all the functions which
- * work on #igt_pipe_crc_t. This is supported on all platforms and outputs.
- *
- * Actually using pipe CRCs to write modeset tests is a bit tricky though, so
- * there is no way to directly check a CRC: Both the details of the plane
- * blending, color correction and other hardware and how exactly the CRC is
- * computed at each tap point vary by hardware generation and are not disclosed.
- *
- * The only way to use #igt_crc_t CRCs therefore is to compare CRCs among each
- * another either for equality or difference. Otherwise CRCs must be treated as
- * completely opaque values. Note that not even CRCs from different pipes or tap
- * points on the same platform can be compared. Hence only use
- * igt_assert_crc_equal() to inspect CRC values captured by the same
- * #igt_pipe_crc_t object.
- *
  * # Other debugfs interface wrappers
  *
  * This covers the miscellaneous debugfs interface wrappers:
@@ -385,175 +367,6 @@ bool igt_debugfs_search(int device, const char *filename, const char *substring)
 	return matched;
 }
 
-/*
- * Pipe CRC
- */
-
-/**
- * igt_find_crc_mismatch:
- * @a: first pipe CRC value
- * @b: second pipe CRC value
- * @index: index of the first value that mismatched
- *
- * Check if CRC a and CRC b mismatch.
- *
- * Returns true if CRC values mismatch, false otherwise;
- */
-bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index)
-{
-	int nwords = min(a->n_words, b->n_words);
-	int i;
-
-	for (i = 0; i < nwords; i++) {
-		if (a->crc[i] != b->crc[i]) {
-			if (index)
-				*index = i;
-
-			return true;
-		}
-	}
-
-	if (a->n_words != b->n_words) {
-		if (index)
-			*index = i;
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * igt_assert_crc_equal:
- * @a: first pipe CRC value
- * @b: second pipe CRC value
- *
- * Compares two CRC values and fails the testcase if they don't match with
- * igt_fail(). Note that due to CRC collisions CRC based testcase can only
- * assert that CRCs match, never that they are different. Otherwise there might
- * be random testcase failures when different screen contents end up with the
- * same CRC by chance.
- *
- * Passing --skip-crc-compare on the command line will force this function
- * to always pass, which can be useful in interactive debugging where you
- * might know the test will fail, but still want the test to keep going as if
- * it had succeeded so that you can see the on-screen behavior.
- *
- */
-void igt_assert_crc_equal(const igt_crc_t *a, const igt_crc_t *b)
-{
-	int index;
-	bool mismatch;
-
-	mismatch = igt_find_crc_mismatch(a, b, &index);
-	if (mismatch)
-		igt_debug("CRC mismatch%s at index %d: 0x%x != 0x%x\n",
-			  igt_skip_crc_compare ? " (ignored)" : "",
-			  index, a->crc[index], b->crc[index]);
-
-	igt_assert(!mismatch || igt_skip_crc_compare);
-}
-
-/**
- * igt_check_crc_equal:
- * @a: first pipe CRC value
- * @b: second pipe CRC value
- *
- * Compares two CRC values and return whether they match.
- *
- * Returns: A boolean indicating whether the CRC values match
- */
-bool igt_check_crc_equal(const igt_crc_t *a, const igt_crc_t *b)
-{
-	int index;
-	bool mismatch;
-
-	mismatch = igt_find_crc_mismatch(a, b, &index);
-	if (mismatch)
-		igt_debug("CRC mismatch at index %d: 0x%x != 0x%x\n", index,
-			  a->crc[index], b->crc[index]);
-
-	return !mismatch;
-}
-
-/**
- * igt_crc_to_string_extended:
- * @crc: pipe CRC value to print
- * @delimiter: The delimiter to use between crc words
- * @crc_size: the number of bytes to print per crc word (between 1 and 4)
- *
- * This function allocates a string and formats @crc into it, depending on
- * @delimiter and @crc_size.
- * The caller is responsible for freeing the string.
- *
- * This should only ever be used for diagnostic debug output.
- */
-char *igt_crc_to_string_extended(igt_crc_t *crc, char delimiter, int crc_size)
-{
-	int i;
-	int len = 0;
-	int field_width = 2 * crc_size; /* Two chars per byte. */
-	char *buf = malloc((field_width+1) * crc->n_words);
-
-	if (!buf)
-		return NULL;
-
-	for (i = 0; i < crc->n_words - 1; i++)
-		len += sprintf(buf + len, "%0*x%c", field_width,
-			       crc->crc[i], delimiter);
-
-	sprintf(buf + len, "%0*x", field_width, crc->crc[i]);
-
-	return buf;
-}
-
-/**
- * igt_crc_to_string:
- * @crc: pipe CRC value to print
- *
- * This function allocates a string and formats @crc into it.
- * The caller is responsible for freeing the string.
- *
- * This should only ever be used for diagnostic debug output.
- */
-char *igt_crc_to_string(igt_crc_t *crc)
-{
-	return igt_crc_to_string_extended(crc, ' ', 4);
-}
-
-#define MAX_CRC_ENTRIES 10
-#define MAX_LINE_LEN (10 + 11 * MAX_CRC_ENTRIES + 1)
-
-struct _igt_pipe_crc {
-	int fd;
-	int dir;
-	int ctl_fd;
-	int crc_fd;
-	int flags;
-
-	enum pipe pipe;
-	char *source;
-};
-
-/**
- * igt_require_pipe_crc:
- *
- * Convenience helper to check whether pipe CRC capturing is supported by the
- * kernel. Uses igt_skip to automatically skip the test/subtest if this isn't
- * the case.
- */
-void igt_require_pipe_crc(int fd)
-{
-	int dir;
-	struct stat stat;
-
-	dir = igt_debugfs_dir(fd);
-	igt_require_f(dir >= 0, "Could not open debugfs directory\n");
-	igt_require_f(fstatat(dir, "crtc-0/crc/control", &stat, 0) == 0,
-		      "CRCs not supported on this platform\n");
-
-	close(dir);
-}
-
 static void igt_hpd_storm_exit_handler(int sig)
 {
 	int fd = drm_open_driver(DRIVER_INTEL);
@@ -675,377 +488,6 @@ void igt_require_hpd_storm_ctl(int drm_fd)
 	close(fd);
 }
 
-static igt_pipe_crc_t *
-pipe_crc_new(int fd, enum pipe pipe, const char *source, int flags)
-{
-	igt_pipe_crc_t *pipe_crc;
-	char buf[128];
-	int debugfs;
-
-	igt_assert(source);
-
-	debugfs = igt_debugfs_dir(fd);
-	igt_assert(debugfs != -1);
-
-	pipe_crc = calloc(1, sizeof(struct _igt_pipe_crc));
-	igt_assert(pipe_crc);
-
-	sprintf(buf, "crtc-%d/crc/control", pipe);
-	pipe_crc->ctl_fd = openat(debugfs, buf, O_WRONLY);
-	igt_assert(pipe_crc->ctl_fd != -1);
-
-	pipe_crc->crc_fd = -1;
-	pipe_crc->fd = fd;
-	pipe_crc->dir = debugfs;
-	pipe_crc->pipe = pipe;
-	pipe_crc->source = strdup(source);
-	igt_assert(pipe_crc->source);
-	pipe_crc->flags = flags;
-
-	return pipe_crc;
-}
-
-/**
- * igt_pipe_crc_new:
- * @pipe: display pipe to use as source
- * @source: CRC tap point to use as source
- *
- * This sets up a new pipe CRC capture object for the given @pipe and @source
- * in blocking mode.
- *
- * Returns: A pipe CRC object for the given @pipe and @source. The library
- * assumes that the source is always available since recent kernels support at
- * least IGT_PIPE_CRC_SOURCE_AUTO everywhere.
- */
-igt_pipe_crc_t *
-igt_pipe_crc_new(int fd, enum pipe pipe, const char *source)
-{
-	return pipe_crc_new(fd, pipe, source, O_RDONLY);
-}
-
-/**
- * igt_pipe_crc_new_nonblock:
- * @pipe: display pipe to use as source
- * @source: CRC tap point to use as source
- *
- * This sets up a new pipe CRC capture object for the given @pipe and @source
- * in nonblocking mode.
- *
- * Returns: A pipe CRC object for the given @pipe and @source. The library
- * assumes that the source is always available since recent kernels support at
- * least IGT_PIPE_CRC_SOURCE_AUTO everywhere.
- */
-igt_pipe_crc_t *
-igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, const char *source)
-{
-	return pipe_crc_new(fd, pipe, source, O_RDONLY | O_NONBLOCK);
-}
-
-/**
- * igt_pipe_crc_free:
- * @pipe_crc: pipe CRC object
- *
- * Frees all resources associated with @pipe_crc.
- */
-void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc)
-{
-	if (!pipe_crc)
-		return;
-
-	close(pipe_crc->ctl_fd);
-	close(pipe_crc->crc_fd);
-	close(pipe_crc->dir);
-	free(pipe_crc->source);
-	free(pipe_crc);
-}
-
-static bool pipe_crc_init_from_string(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc,
-				      const char *line)
-{
-	int i;
-	const char *buf;
-
-	if (strncmp(line, "XXXXXXXXXX", 10) == 0)
-		crc->has_valid_frame = false;
-	else {
-		crc->has_valid_frame = true;
-		crc->frame = strtoul(line, NULL, 16);
-	}
-
-	buf = line + 10;
-	for (i = 0; *buf != '\n'; i++, buf += 11)
-		crc->crc[i] = strtoul(buf, NULL, 16);
-
-	crc->n_words = i;
-
-	return true;
-}
-
-static int read_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
-{
-	ssize_t bytes_read;
-	char buf[MAX_LINE_LEN + 1];
-
-	igt_set_timeout(5, "CRC reading");
-	bytes_read = read(pipe_crc->crc_fd, &buf, MAX_LINE_LEN);
-	igt_reset_timeout();
-
-	if (bytes_read < 0)
-		bytes_read = -errno;
-	else
-		buf[bytes_read] = '\0';
-
-	if (bytes_read > 0 && !pipe_crc_init_from_string(pipe_crc, out, buf))
-		return -EINVAL;
-
-	return bytes_read;
-}
-
-static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
-{
-	int ret;
-
-	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags & ~O_NONBLOCK);
-
-	do {
-		ret = read_crc(pipe_crc, out);
-	} while (ret == -EINTR);
-
-	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
-}
-
-/**
- * igt_pipe_crc_start:
- * @pipe_crc: pipe CRC object
- *
- * Starts the CRC capture process on @pipe_crc.
- */
-void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
-{
-	const char *src = pipe_crc->source;
-	struct pollfd pfd;
-	char buf[32];
-
-	/* Stop first just to make sure we don't have lingering state left. */
-	igt_pipe_crc_stop(pipe_crc);
-
-	igt_reset_fifo_underrun_reporting(pipe_crc->fd);
-
-	igt_assert_eq(write(pipe_crc->ctl_fd, src, strlen(src)), strlen(src));
-
-	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
-
-	igt_set_timeout(10, "Opening crc fd, and poll for first CRC.");
-	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
-	igt_assert(pipe_crc->crc_fd != -1);
-
-	pfd.fd = pipe_crc->crc_fd;
-	pfd.events = POLLIN;
-	poll(&pfd, 1, -1);
-
-	igt_reset_timeout();
-
-	errno = 0;
-}
-
-/**
- * igt_pipe_crc_stop:
- * @pipe_crc: pipe CRC object
- *
- * Stops the CRC capture process on @pipe_crc.
- */
-void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc)
-{
-	close(pipe_crc->crc_fd);
-	pipe_crc->crc_fd = -1;
-}
-
-/**
- * igt_pipe_crc_get_crcs:
- * @pipe_crc: pipe CRC object
- * @n_crcs: number of CRCs to capture
- * @out_crcs: buffer pointer for the captured CRC values
- *
- * Read up to @n_crcs from @pipe_crc. This function does not block, and will
- * return early if not enough CRCs can be captured, if @pipe_crc has been
- * opened using igt_pipe_crc_new_nonblock(). It will block until @n_crcs are
- * retrieved if @pipe_crc has been opened using igt_pipe_crc_new(). @out_crcs is
- * alloced by this function and must be released with free() by the caller.
- *
- * Callers must start and stop the capturing themselves by calling
- * igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
- * look at igt_pipe_crc_collect_crc().
- *
- * Returns:
- * The number of CRCs captured. Should be equal to @n_crcs in blocking mode, but
- * can be less (even zero) in non-blocking mode.
- */
-int
-igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
-		      igt_crc_t **out_crcs)
-{
-	igt_crc_t *crcs;
-	int n = 0;
-
-	crcs = calloc(n_crcs, sizeof(igt_crc_t));
-
-	do {
-		igt_crc_t *crc = &crcs[n];
-		int ret;
-
-		ret = read_crc(pipe_crc, crc);
-		if (ret == -EAGAIN)
-			break;
-
-		if (ret < 0)
-			continue;
-
-		n++;
-	} while (n < n_crcs);
-
-	*out_crcs = crcs;
-	return n;
-}
-
-static void crc_sanity_checks(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
-{
-	int i;
-	bool all_zero = true;
-
-	/* Any CRC value can be considered valid on amdgpu hardware. */
-	if (is_amdgpu_device(pipe_crc->fd))
-		return;
-
-	for (i = 0; i < crc->n_words; i++) {
-		igt_warn_on_f(crc->crc[i] == 0xffffffff,
-			      "Suspicious CRC: it looks like the CRC "
-			      "read back was from a register in a powered "
-			      "down well\n");
-		if (crc->crc[i])
-			all_zero = false;
-	}
-
-	igt_warn_on_f(all_zero, "Suspicious CRC: All values are 0.\n");
-}
-
-/**
- * igt_pipe_crc_drain:
- * @pipe_crc: pipe CRC object
- *
- * Discards all currently queued CRC values from @pipe_crc. This function does
- * not block, and is useful to flush @pipe_crc. Afterwards you can get a fresh
- * CRC with igt_pipe_crc_get_single().
- */
-void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
-{
-	int ret;
-	igt_crc_t crc;
-
-	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags | O_NONBLOCK);
-
-	do {
-		ret = read_crc(pipe_crc, &crc);
-	} while (ret > 0 || ret == -EINVAL);
-
-	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
-}
-
-/**
- * igt_pipe_crc_get_single:
- * @pipe_crc: pipe CRC object
- * @crc: buffer pointer for the captured CRC value
- *
- * Read a single @crc from @pipe_crc. This function blocks even
- * when nonblocking CRC is requested.
- *
- * Callers must start and stop the capturing themselves by calling
- * igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
- * look at igt_pipe_crc_collect_crc().
- *
- * If capturing has been going on for a while and a fresh crc is required,
- * you should use igt_pipe_crc_get_current() instead.
- */
-void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
-{
-	read_one_crc(pipe_crc, crc);
-
-	crc_sanity_checks(pipe_crc, crc);
-}
-
-/**
- * igt_pipe_crc_get_current:
- * @drm_fd: Pointer to drm fd for vblank counter
- * @pipe_crc: pipe CRC object
- * @vblank: frame counter value we're looking for
- * @crc: buffer pointer for the captured CRC value
- *
- * Same as igt_pipe_crc_get_single(), but will wait until a CRC has been captured
- * for frame @vblank.
- */
-void
-igt_pipe_crc_get_for_frame(int drm_fd, igt_pipe_crc_t *pipe_crc,
-			   unsigned int vblank, igt_crc_t *crc)
-{
-	do {
-		read_one_crc(pipe_crc, crc);
-
-		/* Only works with valid frame counter */
-		if (!crc->has_valid_frame) {
-			igt_pipe_crc_drain(pipe_crc);
-			igt_pipe_crc_get_single(pipe_crc, crc);
-			return;
-		}
-	} while (igt_vblank_before(crc->frame, vblank));
-
-	crc_sanity_checks(pipe_crc, crc);
-}
-
-/**
- * igt_pipe_crc_get_current:
- * @drm_fd: Pointer to drm fd for vblank counter
- * @pipe_crc: pipe CRC object
- * @crc: buffer pointer for the captured CRC value
- *
- * Same as igt_pipe_crc_get_single(), but will wait until a new CRC can be captured.
- * This is useful for retrieving the current CRC in a more race free way than
- * igt_pipe_crc_drain() + igt_pipe_crc_get_single().
- */
-void
-igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
-{
-	unsigned vblank = kmstest_get_vblank(drm_fd, pipe_crc->pipe, 0) + 1;
-
-	return igt_pipe_crc_get_for_frame(drm_fd, pipe_crc, vblank, crc);
-}
-
-/**
- * igt_pipe_crc_collect_crc:
- * @pipe_crc: pipe CRC object
- * @out_crc: buffer for the captured CRC values
- *
- * Read a single CRC from @pipe_crc. This function blocks until the CRC is
- * retrieved, irrespective of whether @pipe_crc has been opened with
- * igt_pipe_crc_new() or igt_pipe_crc_new_nonblock().  @out_crc must be
- * allocated by the caller.
- *
- * This function takes care of the pipe_crc book-keeping, it will start/stop
- * the collection of the CRC.
- *
- * This function also calls the interactive debug with the "crc" domain, so you
- * can make use of this feature to actually see the screen that is being CRC'd.
- *
- * For continuous CRC collection look at igt_pipe_crc_start(),
- * igt_pipe_crc_get_crcs() and igt_pipe_crc_stop().
- */
-void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc)
-{
-	igt_debug_wait_for_keypress("crc");
-
-	igt_pipe_crc_start(pipe_crc);
-	igt_pipe_crc_get_single(pipe_crc, out_crc);
-	igt_pipe_crc_stop(pipe_crc);
-}
-
 /**
  * igt_reset_fifo_underrun_reporting:
  * @drm_fd: drm device file descriptor
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index cef456587641..01d332d72601 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -54,63 +54,6 @@ bool igt_debugfs_search(int fd, const char *filename, const char *substring);
 #define igt_debugfs_read(fd, filename, buf) \
 		__igt_debugfs_read(fd, (filename), (buf), sizeof(buf))
 
-/*
- * Pipe CRC
- */
-
-/**
- * igt_pipe_crc_t:
- *
- * Pipe CRC support structure. Needs to be allocated and set up with
- * igt_pipe_crc_new() for a specific pipe and pipe CRC source value.
- */
-typedef struct _igt_pipe_crc igt_pipe_crc_t;
-
-#define DRM_MAX_CRC_NR 10
-/**
- * igt_crc_t:
- * @frame: frame number of the capture CRC
- * @n_words: internal field, don't access
- * @crc: internal field, don't access
- *
- * Pipe CRC value. All other members than @frame are private and should not be
- * inspected by testcases.
- */
-typedef struct {
-	uint32_t frame;
-	bool has_valid_frame;
-	int n_words;
-	uint32_t crc[DRM_MAX_CRC_NR];
-} igt_crc_t;
-
-#define IGT_PIPE_CRC_SOURCE_AUTO "auto"
-#define AMDGPU_PIPE_CRC_SOURCE_DPRX "dprx"
-
-bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index);
-void igt_assert_crc_equal(const igt_crc_t *a, const igt_crc_t *b);
-bool igt_check_crc_equal(const igt_crc_t *a, const igt_crc_t *b);
-char *igt_crc_to_string_extended(igt_crc_t *crc, char delimiter, int crc_size);
-char *igt_crc_to_string(igt_crc_t *crc);
-
-void igt_require_pipe_crc(int fd);
-igt_pipe_crc_t *
-igt_pipe_crc_new(int fd, enum pipe pipe, const char *source);
-igt_pipe_crc_t *
-igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, const char *source);
-void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc);
-void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc);
-void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc);
-__attribute__((warn_unused_result))
-int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
-			  igt_crc_t **out_crcs);
-void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc);
-void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
-void igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc);
-void igt_pipe_crc_get_for_frame(int drm_fd, igt_pipe_crc_t *pipe_crc,
-				unsigned int vblank, igt_crc_t *crc);
-
-void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
-
 void igt_hpd_storm_set_threshold(int fd, unsigned int threshold);
 void igt_hpd_storm_reset(int fd);
 bool igt_hpd_storm_detected(int fd);
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index c61d9e7219ff..265d1fc448e6 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -41,6 +41,7 @@
 #include "igt_debugfs.h"
 
 struct buf_ops;
+typedef struct _igt_crc igt_crc_t;
 
 /*
  * Internal format to denote a buffer compatible with pixman's
diff --git a/lib/igt_pipe_crc.c b/lib/igt_pipe_crc.c
new file mode 100644
index 000000000000..d78807d6c65c
--- /dev/null
+++ b/lib/igt_pipe_crc.c
@@ -0,0 +1,602 @@
+/*
+ * Copyright © 2013 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include <inttypes.h>
+#include <sys/stat.h>
+#include <sys/mount.h>
+#include <sys/sysmacros.h>
+#include <dirent.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <poll.h>
+
+#include "drmtest.h"
+#include "igt_aux.h"
+#include "igt_kms.h"
+#include "igt_debugfs.h"
+#include "igt_pipe_crc.h"
+
+/**
+ * SECTION:igt_pipe_crc
+ * @short_description: Pipe CRC support
+ * @title: pipe_crc
+ * @include: igt_pipe_crc.h
+ *
+ * This library wraps up the kernel's support for capturing pipe CRCs into a
+ * neat and tidy package. For the detailed usage see all the functions which
+ * work on #igt_pipe_crc_t. This is supported on all platforms and outputs.
+ *
+ * Actually using pipe CRCs to write modeset tests is a bit tricky though, so
+ * there is no way to directly check a CRC: Both the details of the plane
+ * blending, color correction and other hardware and how exactly the CRC is
+ * computed at each tap point vary by hardware generation and are not disclosed.
+ *
+ * The only way to use #igt_crc_t CRCs therefore is to compare CRCs among each
+ * another either for equality or difference. Otherwise CRCs must be treated as
+ * completely opaque values. Note that not even CRCs from different pipes or tap
+ * points on the same platform can be compared. Hence only use
+ * igt_assert_crc_equal() to inspect CRC values captured by the same
+ * #igt_pipe_crc_t object.
+ */
+
+/**
+ * igt_find_crc_mismatch:
+ * @a: first pipe CRC value
+ * @b: second pipe CRC value
+ * @index: index of the first value that mismatched
+ *
+ * Check if CRC a and CRC b mismatch.
+ *
+ * Returns true if CRC values mismatch, false otherwise;
+ */
+bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index)
+{
+	int nwords = min(a->n_words, b->n_words);
+	int i;
+
+	for (i = 0; i < nwords; i++) {
+		if (a->crc[i] != b->crc[i]) {
+			if (index)
+				*index = i;
+
+			return true;
+		}
+	}
+
+	if (a->n_words != b->n_words) {
+		if (index)
+			*index = i;
+		return true;
+	}
+
+	return false;
+}
+
+/**
+ * igt_assert_crc_equal:
+ * @a: first pipe CRC value
+ * @b: second pipe CRC value
+ *
+ * Compares two CRC values and fails the testcase if they don't match with
+ * igt_fail(). Note that due to CRC collisions CRC based testcase can only
+ * assert that CRCs match, never that they are different. Otherwise there might
+ * be random testcase failures when different screen contents end up with the
+ * same CRC by chance.
+ *
+ * Passing --skip-crc-compare on the command line will force this function
+ * to always pass, which can be useful in interactive debugging where you
+ * might know the test will fail, but still want the test to keep going as if
+ * it had succeeded so that you can see the on-screen behavior.
+ *
+ */
+void igt_assert_crc_equal(const igt_crc_t *a, const igt_crc_t *b)
+{
+	int index;
+	bool mismatch;
+
+	mismatch = igt_find_crc_mismatch(a, b, &index);
+	if (mismatch)
+		igt_debug("CRC mismatch%s at index %d: 0x%x != 0x%x\n",
+			  igt_skip_crc_compare ? " (ignored)" : "",
+			  index, a->crc[index], b->crc[index]);
+
+	igt_assert(!mismatch || igt_skip_crc_compare);
+}
+
+/**
+ * igt_check_crc_equal:
+ * @a: first pipe CRC value
+ * @b: second pipe CRC value
+ *
+ * Compares two CRC values and return whether they match.
+ *
+ * Returns: A boolean indicating whether the CRC values match
+ */
+bool igt_check_crc_equal(const igt_crc_t *a, const igt_crc_t *b)
+{
+	int index;
+	bool mismatch;
+
+	mismatch = igt_find_crc_mismatch(a, b, &index);
+	if (mismatch)
+		igt_debug("CRC mismatch at index %d: 0x%x != 0x%x\n", index,
+			  a->crc[index], b->crc[index]);
+
+	return !mismatch;
+}
+
+/**
+ * igt_crc_to_string_extended:
+ * @crc: pipe CRC value to print
+ * @delimiter: The delimiter to use between crc words
+ * @crc_size: the number of bytes to print per crc word (between 1 and 4)
+ *
+ * This function allocates a string and formats @crc into it, depending on
+ * @delimiter and @crc_size.
+ * The caller is responsible for freeing the string.
+ *
+ * This should only ever be used for diagnostic debug output.
+ */
+char *igt_crc_to_string_extended(igt_crc_t *crc, char delimiter, int crc_size)
+{
+	int i;
+	int len = 0;
+	int field_width = 2 * crc_size; /* Two chars per byte. */
+	char *buf = malloc((field_width+1) * crc->n_words);
+
+	if (!buf)
+		return NULL;
+
+	for (i = 0; i < crc->n_words - 1; i++)
+		len += sprintf(buf + len, "%0*x%c", field_width,
+			       crc->crc[i], delimiter);
+
+	sprintf(buf + len, "%0*x", field_width, crc->crc[i]);
+
+	return buf;
+}
+
+/**
+ * igt_crc_to_string:
+ * @crc: pipe CRC value to print
+ *
+ * This function allocates a string and formats @crc into it.
+ * The caller is responsible for freeing the string.
+ *
+ * This should only ever be used for diagnostic debug output.
+ */
+char *igt_crc_to_string(igt_crc_t *crc)
+{
+	return igt_crc_to_string_extended(crc, ' ', 4);
+}
+
+#define MAX_CRC_ENTRIES 10
+#define MAX_LINE_LEN (10 + 11 * MAX_CRC_ENTRIES + 1)
+
+struct _igt_pipe_crc {
+	int fd;
+	int dir;
+	int ctl_fd;
+	int crc_fd;
+	int flags;
+
+	enum pipe pipe;
+	char *source;
+};
+
+/**
+ * igt_require_pipe_crc:
+ *
+ * Convenience helper to check whether pipe CRC capturing is supported by the
+ * kernel. Uses igt_skip to automatically skip the test/subtest if this isn't
+ * the case.
+ */
+void igt_require_pipe_crc(int fd)
+{
+	int dir;
+	struct stat stat;
+
+	dir = igt_debugfs_dir(fd);
+	igt_require_f(dir >= 0, "Could not open debugfs directory\n");
+	igt_require_f(fstatat(dir, "crtc-0/crc/control", &stat, 0) == 0,
+		      "CRCs not supported on this platform\n");
+
+	close(dir);
+}
+
+static igt_pipe_crc_t *
+pipe_crc_new(int fd, enum pipe pipe, const char *source, int flags)
+{
+	igt_pipe_crc_t *pipe_crc;
+	char buf[128];
+	int debugfs;
+
+	igt_assert(source);
+
+	debugfs = igt_debugfs_dir(fd);
+	igt_assert(debugfs != -1);
+
+	pipe_crc = calloc(1, sizeof(struct _igt_pipe_crc));
+	igt_assert(pipe_crc);
+
+	sprintf(buf, "crtc-%d/crc/control", pipe);
+	pipe_crc->ctl_fd = openat(debugfs, buf, O_WRONLY);
+	igt_assert(pipe_crc->ctl_fd != -1);
+
+	pipe_crc->crc_fd = -1;
+	pipe_crc->fd = fd;
+	pipe_crc->dir = debugfs;
+	pipe_crc->pipe = pipe;
+	pipe_crc->source = strdup(source);
+	igt_assert(pipe_crc->source);
+	pipe_crc->flags = flags;
+
+	return pipe_crc;
+}
+
+/**
+ * igt_pipe_crc_new:
+ * @pipe: display pipe to use as source
+ * @source: CRC tap point to use as source
+ *
+ * This sets up a new pipe CRC capture object for the given @pipe and @source
+ * in blocking mode.
+ *
+ * Returns: A pipe CRC object for the given @pipe and @source. The library
+ * assumes that the source is always available since recent kernels support at
+ * least IGT_PIPE_CRC_SOURCE_AUTO everywhere.
+ */
+igt_pipe_crc_t *
+igt_pipe_crc_new(int fd, enum pipe pipe, const char *source)
+{
+	return pipe_crc_new(fd, pipe, source, O_RDONLY);
+}
+
+/**
+ * igt_pipe_crc_new_nonblock:
+ * @pipe: display pipe to use as source
+ * @source: CRC tap point to use as source
+ *
+ * This sets up a new pipe CRC capture object for the given @pipe and @source
+ * in nonblocking mode.
+ *
+ * Returns: A pipe CRC object for the given @pipe and @source. The library
+ * assumes that the source is always available since recent kernels support at
+ * least IGT_PIPE_CRC_SOURCE_AUTO everywhere.
+ */
+igt_pipe_crc_t *
+igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, const char *source)
+{
+	return pipe_crc_new(fd, pipe, source, O_RDONLY | O_NONBLOCK);
+}
+
+/**
+ * igt_pipe_crc_free:
+ * @pipe_crc: pipe CRC object
+ *
+ * Frees all resources associated with @pipe_crc.
+ */
+void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc)
+{
+	if (!pipe_crc)
+		return;
+
+	close(pipe_crc->ctl_fd);
+	close(pipe_crc->crc_fd);
+	close(pipe_crc->dir);
+	free(pipe_crc->source);
+	free(pipe_crc);
+}
+
+static bool pipe_crc_init_from_string(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc,
+				      const char *line)
+{
+	int i;
+	const char *buf;
+
+	if (strncmp(line, "XXXXXXXXXX", 10) == 0)
+		crc->has_valid_frame = false;
+	else {
+		crc->has_valid_frame = true;
+		crc->frame = strtoul(line, NULL, 16);
+	}
+
+	buf = line + 10;
+	for (i = 0; *buf != '\n'; i++, buf += 11)
+		crc->crc[i] = strtoul(buf, NULL, 16);
+
+	crc->n_words = i;
+
+	return true;
+}
+
+static int read_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
+{
+	ssize_t bytes_read;
+	char buf[MAX_LINE_LEN + 1];
+
+	igt_set_timeout(5, "CRC reading");
+	bytes_read = read(pipe_crc->crc_fd, &buf, MAX_LINE_LEN);
+	igt_reset_timeout();
+
+	if (bytes_read < 0)
+		bytes_read = -errno;
+	else
+		buf[bytes_read] = '\0';
+
+	if (bytes_read > 0 && !pipe_crc_init_from_string(pipe_crc, out, buf))
+		return -EINVAL;
+
+	return bytes_read;
+}
+
+static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
+{
+	int ret;
+
+	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags & ~O_NONBLOCK);
+
+	do {
+		ret = read_crc(pipe_crc, out);
+	} while (ret == -EINTR);
+
+	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
+}
+
+/**
+ * igt_pipe_crc_start:
+ * @pipe_crc: pipe CRC object
+ *
+ * Starts the CRC capture process on @pipe_crc.
+ */
+void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
+{
+	const char *src = pipe_crc->source;
+	struct pollfd pfd;
+	char buf[32];
+
+	/* Stop first just to make sure we don't have lingering state left. */
+	igt_pipe_crc_stop(pipe_crc);
+
+	igt_reset_fifo_underrun_reporting(pipe_crc->fd);
+
+	igt_assert_eq(write(pipe_crc->ctl_fd, src, strlen(src)), strlen(src));
+
+	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
+
+	igt_set_timeout(10, "Opening crc fd, and poll for first CRC.");
+	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
+	igt_assert(pipe_crc->crc_fd != -1);
+
+	pfd.fd = pipe_crc->crc_fd;
+	pfd.events = POLLIN;
+	poll(&pfd, 1, -1);
+
+	igt_reset_timeout();
+
+	errno = 0;
+}
+
+/**
+ * igt_pipe_crc_stop:
+ * @pipe_crc: pipe CRC object
+ *
+ * Stops the CRC capture process on @pipe_crc.
+ */
+void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc)
+{
+	close(pipe_crc->crc_fd);
+	pipe_crc->crc_fd = -1;
+}
+
+/**
+ * igt_pipe_crc_get_crcs:
+ * @pipe_crc: pipe CRC object
+ * @n_crcs: number of CRCs to capture
+ * @out_crcs: buffer pointer for the captured CRC values
+ *
+ * Read up to @n_crcs from @pipe_crc. This function does not block, and will
+ * return early if not enough CRCs can be captured, if @pipe_crc has been
+ * opened using igt_pipe_crc_new_nonblock(). It will block until @n_crcs are
+ * retrieved if @pipe_crc has been opened using igt_pipe_crc_new(). @out_crcs is
+ * alloced by this function and must be released with free() by the caller.
+ *
+ * Callers must start and stop the capturing themselves by calling
+ * igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
+ * look at igt_pipe_crc_collect_crc().
+ *
+ * Returns:
+ * The number of CRCs captured. Should be equal to @n_crcs in blocking mode, but
+ * can be less (even zero) in non-blocking mode.
+ */
+int
+igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
+		      igt_crc_t **out_crcs)
+{
+	igt_crc_t *crcs;
+	int n = 0;
+
+	crcs = calloc(n_crcs, sizeof(igt_crc_t));
+
+	do {
+		igt_crc_t *crc = &crcs[n];
+		int ret;
+
+		ret = read_crc(pipe_crc, crc);
+		if (ret == -EAGAIN)
+			break;
+
+		if (ret < 0)
+			continue;
+
+		n++;
+	} while (n < n_crcs);
+
+	*out_crcs = crcs;
+	return n;
+}
+
+static void crc_sanity_checks(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
+{
+	int i;
+	bool all_zero = true;
+
+	/* Any CRC value can be considered valid on amdgpu hardware. */
+	if (is_amdgpu_device(pipe_crc->fd))
+		return;
+
+	for (i = 0; i < crc->n_words; i++) {
+		igt_warn_on_f(crc->crc[i] == 0xffffffff,
+			      "Suspicious CRC: it looks like the CRC "
+			      "read back was from a register in a powered "
+			      "down well\n");
+		if (crc->crc[i])
+			all_zero = false;
+	}
+
+	igt_warn_on_f(all_zero, "Suspicious CRC: All values are 0.\n");
+}
+
+/**
+ * igt_pipe_crc_drain:
+ * @pipe_crc: pipe CRC object
+ *
+ * Discards all currently queued CRC values from @pipe_crc. This function does
+ * not block, and is useful to flush @pipe_crc. Afterwards you can get a fresh
+ * CRC with igt_pipe_crc_get_single().
+ */
+void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
+{
+	int ret;
+	igt_crc_t crc;
+
+	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags | O_NONBLOCK);
+
+	do {
+		ret = read_crc(pipe_crc, &crc);
+	} while (ret > 0 || ret == -EINVAL);
+
+	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
+}
+
+/**
+ * igt_pipe_crc_get_single:
+ * @pipe_crc: pipe CRC object
+ * @crc: buffer pointer for the captured CRC value
+ *
+ * Read a single @crc from @pipe_crc. This function blocks even
+ * when nonblocking CRC is requested.
+ *
+ * Callers must start and stop the capturing themselves by calling
+ * igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
+ * look at igt_pipe_crc_collect_crc().
+ *
+ * If capturing has been going on for a while and a fresh crc is required,
+ * you should use igt_pipe_crc_get_current() instead.
+ */
+void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
+{
+	read_one_crc(pipe_crc, crc);
+
+	crc_sanity_checks(pipe_crc, crc);
+}
+
+/**
+ * igt_pipe_crc_get_current:
+ * @drm_fd: Pointer to drm fd for vblank counter
+ * @pipe_crc: pipe CRC object
+ * @vblank: frame counter value we're looking for
+ * @crc: buffer pointer for the captured CRC value
+ *
+ * Same as igt_pipe_crc_get_single(), but will wait until a CRC has been captured
+ * for frame @vblank.
+ */
+void
+igt_pipe_crc_get_for_frame(int drm_fd, igt_pipe_crc_t *pipe_crc,
+			   unsigned int vblank, igt_crc_t *crc)
+{
+	do {
+		read_one_crc(pipe_crc, crc);
+
+		/* Only works with valid frame counter */
+		if (!crc->has_valid_frame) {
+			igt_pipe_crc_drain(pipe_crc);
+			igt_pipe_crc_get_single(pipe_crc, crc);
+			return;
+		}
+	} while (igt_vblank_before(crc->frame, vblank));
+
+	crc_sanity_checks(pipe_crc, crc);
+}
+
+/**
+ * igt_pipe_crc_get_current:
+ * @drm_fd: Pointer to drm fd for vblank counter
+ * @pipe_crc: pipe CRC object
+ * @crc: buffer pointer for the captured CRC value
+ *
+ * Same as igt_pipe_crc_get_single(), but will wait until a new CRC can be captured.
+ * This is useful for retrieving the current CRC in a more race free way than
+ * igt_pipe_crc_drain() + igt_pipe_crc_get_single().
+ */
+void
+igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
+{
+	unsigned vblank = kmstest_get_vblank(drm_fd, pipe_crc->pipe, 0) + 1;
+
+	return igt_pipe_crc_get_for_frame(drm_fd, pipe_crc, vblank, crc);
+}
+
+/**
+ * igt_pipe_crc_collect_crc:
+ * @pipe_crc: pipe CRC object
+ * @out_crc: buffer for the captured CRC values
+ *
+ * Read a single CRC from @pipe_crc. This function blocks until the CRC is
+ * retrieved, irrespective of whether @pipe_crc has been opened with
+ * igt_pipe_crc_new() or igt_pipe_crc_new_nonblock().  @out_crc must be
+ * allocated by the caller.
+ *
+ * This function takes care of the pipe_crc book-keeping, it will start/stop
+ * the collection of the CRC.
+ *
+ * This function also calls the interactive debug with the "crc" domain, so you
+ * can make use of this feature to actually see the screen that is being CRC'd.
+ *
+ * For continuous CRC collection look at igt_pipe_crc_start(),
+ * igt_pipe_crc_get_crcs() and igt_pipe_crc_stop().
+ */
+void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc)
+{
+	igt_debug_wait_for_keypress("crc");
+
+	igt_pipe_crc_start(pipe_crc);
+	igt_pipe_crc_get_single(pipe_crc, out_crc);
+	igt_pipe_crc_stop(pipe_crc);
+}
diff --git a/lib/igt_pipe_crc.h b/lib/igt_pipe_crc.h
new file mode 100644
index 000000000000..870a861d4c1c
--- /dev/null
+++ b/lib/igt_pipe_crc.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright © 2013 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __IGT_PIPE_CRC_H__
+#define __IGT_PIPE_CRC_H__
+
+#include <stdbool.h>
+#include <stdint.h>
+
+enum pipe;
+
+/*
+ * Pipe CRC
+ */
+
+/**
+ * igt_pipe_crc_t:
+ *
+ * Pipe CRC support structure. Needs to be allocated and set up with
+ * igt_pipe_crc_new() for a specific pipe and pipe CRC source value.
+ */
+typedef struct _igt_pipe_crc igt_pipe_crc_t;
+
+#define DRM_MAX_CRC_NR 10
+/**
+ * igt_crc_t:
+ * @frame: frame number of the capture CRC
+ * @n_words: internal field, don't access
+ * @crc: internal field, don't access
+ *
+ * Pipe CRC value. All other members than @frame are private and should not be
+ * inspected by testcases.
+ */
+struct _igt_crc {
+	uint32_t frame;
+	bool has_valid_frame;
+	int n_words;
+	uint32_t crc[DRM_MAX_CRC_NR];
+};
+typedef struct _igt_crc igt_crc_t;
+
+#define IGT_PIPE_CRC_SOURCE_AUTO "auto"
+#define AMDGPU_PIPE_CRC_SOURCE_DPRX "dprx"
+
+bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index);
+void igt_assert_crc_equal(const igt_crc_t *a, const igt_crc_t *b);
+bool igt_check_crc_equal(const igt_crc_t *a, const igt_crc_t *b);
+char *igt_crc_to_string_extended(igt_crc_t *crc, char delimiter, int crc_size);
+char *igt_crc_to_string(igt_crc_t *crc);
+
+void igt_require_pipe_crc(int fd);
+igt_pipe_crc_t *
+igt_pipe_crc_new(int fd, enum pipe pipe, const char *source);
+igt_pipe_crc_t *
+igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, const char *source);
+void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc);
+void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc);
+void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc);
+__attribute__((warn_unused_result))
+int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
+			  igt_crc_t **out_crcs);
+void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc);
+void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
+void igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc);
+void igt_pipe_crc_get_for_frame(int drm_fd, igt_pipe_crc_t *pipe_crc,
+				unsigned int vblank, igt_crc_t *crc);
+
+void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
+
+#endif /* __IGT_PIPE_CRC_H__ */
diff --git a/lib/meson.build b/lib/meson.build
index c3080fc82c29..6c1cea14e508 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -22,6 +22,7 @@ lib_sources = [
 	'igt_matrix.c',
 	'igt_params.c',
 	'igt_perf.c',
+	'igt_pipe_crc.c',
 	'igt_primes.c',
 	'igt_rand.c',
 	'igt_rapl.c',
diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c
index 74b8942ed10e..1010d399f3bc 100644
--- a/tests/i915/kms_mmap_write_crc.c
+++ b/tests/i915/kms_mmap_write_crc.c
@@ -33,6 +33,7 @@
 #include "drmtest.h"
 #include "igt_debugfs.h"
 #include "igt_kms.h"
+#include "igt_pipe_crc.h"
 #include "intel_chipset.h"
 #include "ioctl_wrappers.h"
 #include "igt_aux.h"
diff --git a/tools/intel_display_crc.c b/tools/intel_display_crc.c
index 61291fc2aa88..357ffb8229f6 100644
--- a/tools/intel_display_crc.c
+++ b/tools/intel_display_crc.c
@@ -32,6 +32,7 @@
 #include "igt_core.h"
 #include "igt_debugfs.h"
 #include "igt_kms.h"
+#include "igt_pipe_crc.h"
 
 typedef struct {
 	int fd;
-- 
2.32.0

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

* Re: [igt-dev] [PATCH i-g-t v2 3/3] lib/crc: Move pipe CRC stuff out from igt_debugfs
  2021-10-20 10:16 ` [igt-dev] [PATCH i-g-t v2 3/3] lib/crc: Move pipe CRC stuff out from igt_debugfs Ville Syrjala
@ 2021-10-20 10:39   ` Petri Latvala
  0 siblings, 0 replies; 6+ messages in thread
From: Petri Latvala @ 2021-10-20 10:39 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

On Wed, Oct 20, 2021 at 01:16:14PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> No reason to hide the pipe CRC code inside the debugfs stuff.
> The fact that pipe CRCs are operated through debugfs is just
> an irrelevant implementation detail.
> 
> Fixed up the few cases that don't include igt.h with this cocci:
> @find@
> identifier ID;
> @@
> igt_crc_t ID;
> 
> @has_include@
> @@
> (
>  #include "igt_pipe_crc.h"
> |
>  #include "igt.h"
> )
> 
> @depends on find && !has_include@
> @@
>   #include "igt_kms.h"
> + #include "igt_pipe_crc.h"
> 
> v2: better cocci to catch lib/igt_chamelium.c
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt.h                       |   1 +
>  lib/igt_chamelium.c             |   1 +
>  lib/igt_chamelium.h             |   1 +
>  lib/igt_debugfs.c               | 558 -----------------------------
>  lib/igt_debugfs.h               |  57 ---
>  lib/igt_fb.h                    |   1 +
>  lib/igt_pipe_crc.c              | 602 ++++++++++++++++++++++++++++++++
>  lib/igt_pipe_crc.h              |  91 +++++
>  lib/meson.build                 |   1 +
>  tests/i915/kms_mmap_write_crc.c |   1 +
>  tools/intel_display_crc.c       |   1 +
>  11 files changed, 700 insertions(+), 615 deletions(-)
>  create mode 100644 lib/igt_pipe_crc.c
>  create mode 100644 lib/igt_pipe_crc.h
> 
> diff --git a/lib/igt.h b/lib/igt.h
> index 0bf98aa5d767..014714b92950 100644
> --- a/lib/igt.h
> +++ b/lib/igt.h
> @@ -38,6 +38,7 @@
>  #include "igt_gt.h"
>  #include "igt_kms.h"
>  #include "igt_params.h"
> +#include "igt_pipe_crc.h"
>  #include "igt_pm.h"
>  #include "igt_stats.h"
>  #ifdef HAVE_CHAMELIUM
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index b4d838bbdb29..2b523a6a2c0c 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -43,6 +43,7 @@
>  #include "igt_frame.h"
>  #include "igt_list.h"
>  #include "igt_kms.h"
> +#include "igt_pipe_crc.h"
>  #include "igt_rc.h"
>  
>  /**
> diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> index f40e848e4f67..af88fec914bd 100644
> --- a/lib/igt_chamelium.h
> +++ b/lib/igt_chamelium.h
> @@ -36,6 +36,7 @@
>  
>  struct igt_fb;
>  struct edid;
> +typedef struct _igt_crc igt_crc_t;
>  
>  struct chamelium;
>  struct chamelium_port;
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index 5ead8aa55e03..4da05cac1a61 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -53,24 +53,6 @@
>   * basic functions to access debugfs files with e.g. igt_debugfs_open() it also
>   * provides higher-level wrappers for some debugfs features.
>   *
> - * # Pipe CRC Support
> - *
> - * This library wraps up the kernel's support for capturing pipe CRCs into a
> - * neat and tidy package. For the detailed usage see all the functions which
> - * work on #igt_pipe_crc_t. This is supported on all platforms and outputs.
> - *
> - * Actually using pipe CRCs to write modeset tests is a bit tricky though, so
> - * there is no way to directly check a CRC: Both the details of the plane
> - * blending, color correction and other hardware and how exactly the CRC is
> - * computed at each tap point vary by hardware generation and are not disclosed.
> - *
> - * The only way to use #igt_crc_t CRCs therefore is to compare CRCs among each
> - * another either for equality or difference. Otherwise CRCs must be treated as
> - * completely opaque values. Note that not even CRCs from different pipes or tap
> - * points on the same platform can be compared. Hence only use
> - * igt_assert_crc_equal() to inspect CRC values captured by the same
> - * #igt_pipe_crc_t object.
> - *
>   * # Other debugfs interface wrappers
>   *
>   * This covers the miscellaneous debugfs interface wrappers:
> @@ -385,175 +367,6 @@ bool igt_debugfs_search(int device, const char *filename, const char *substring)
>  	return matched;
>  }
>  
> -/*
> - * Pipe CRC
> - */
> -
> -/**
> - * igt_find_crc_mismatch:
> - * @a: first pipe CRC value
> - * @b: second pipe CRC value
> - * @index: index of the first value that mismatched
> - *
> - * Check if CRC a and CRC b mismatch.
> - *
> - * Returns true if CRC values mismatch, false otherwise;
> - */
> -bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index)
> -{
> -	int nwords = min(a->n_words, b->n_words);
> -	int i;
> -
> -	for (i = 0; i < nwords; i++) {
> -		if (a->crc[i] != b->crc[i]) {
> -			if (index)
> -				*index = i;
> -
> -			return true;
> -		}
> -	}
> -
> -	if (a->n_words != b->n_words) {
> -		if (index)
> -			*index = i;
> -		return true;
> -	}
> -
> -	return false;
> -}
> -
> -/**
> - * igt_assert_crc_equal:
> - * @a: first pipe CRC value
> - * @b: second pipe CRC value
> - *
> - * Compares two CRC values and fails the testcase if they don't match with
> - * igt_fail(). Note that due to CRC collisions CRC based testcase can only
> - * assert that CRCs match, never that they are different. Otherwise there might
> - * be random testcase failures when different screen contents end up with the
> - * same CRC by chance.
> - *
> - * Passing --skip-crc-compare on the command line will force this function
> - * to always pass, which can be useful in interactive debugging where you
> - * might know the test will fail, but still want the test to keep going as if
> - * it had succeeded so that you can see the on-screen behavior.
> - *
> - */
> -void igt_assert_crc_equal(const igt_crc_t *a, const igt_crc_t *b)
> -{
> -	int index;
> -	bool mismatch;
> -
> -	mismatch = igt_find_crc_mismatch(a, b, &index);
> -	if (mismatch)
> -		igt_debug("CRC mismatch%s at index %d: 0x%x != 0x%x\n",
> -			  igt_skip_crc_compare ? " (ignored)" : "",
> -			  index, a->crc[index], b->crc[index]);
> -
> -	igt_assert(!mismatch || igt_skip_crc_compare);
> -}
> -
> -/**
> - * igt_check_crc_equal:
> - * @a: first pipe CRC value
> - * @b: second pipe CRC value
> - *
> - * Compares two CRC values and return whether they match.
> - *
> - * Returns: A boolean indicating whether the CRC values match
> - */
> -bool igt_check_crc_equal(const igt_crc_t *a, const igt_crc_t *b)
> -{
> -	int index;
> -	bool mismatch;
> -
> -	mismatch = igt_find_crc_mismatch(a, b, &index);
> -	if (mismatch)
> -		igt_debug("CRC mismatch at index %d: 0x%x != 0x%x\n", index,
> -			  a->crc[index], b->crc[index]);
> -
> -	return !mismatch;
> -}
> -
> -/**
> - * igt_crc_to_string_extended:
> - * @crc: pipe CRC value to print
> - * @delimiter: The delimiter to use between crc words
> - * @crc_size: the number of bytes to print per crc word (between 1 and 4)
> - *
> - * This function allocates a string and formats @crc into it, depending on
> - * @delimiter and @crc_size.
> - * The caller is responsible for freeing the string.
> - *
> - * This should only ever be used for diagnostic debug output.
> - */
> -char *igt_crc_to_string_extended(igt_crc_t *crc, char delimiter, int crc_size)
> -{
> -	int i;
> -	int len = 0;
> -	int field_width = 2 * crc_size; /* Two chars per byte. */
> -	char *buf = malloc((field_width+1) * crc->n_words);
> -
> -	if (!buf)
> -		return NULL;
> -
> -	for (i = 0; i < crc->n_words - 1; i++)
> -		len += sprintf(buf + len, "%0*x%c", field_width,
> -			       crc->crc[i], delimiter);
> -
> -	sprintf(buf + len, "%0*x", field_width, crc->crc[i]);
> -
> -	return buf;
> -}
> -
> -/**
> - * igt_crc_to_string:
> - * @crc: pipe CRC value to print
> - *
> - * This function allocates a string and formats @crc into it.
> - * The caller is responsible for freeing the string.
> - *
> - * This should only ever be used for diagnostic debug output.
> - */
> -char *igt_crc_to_string(igt_crc_t *crc)
> -{
> -	return igt_crc_to_string_extended(crc, ' ', 4);
> -}
> -
> -#define MAX_CRC_ENTRIES 10
> -#define MAX_LINE_LEN (10 + 11 * MAX_CRC_ENTRIES + 1)
> -
> -struct _igt_pipe_crc {
> -	int fd;
> -	int dir;
> -	int ctl_fd;
> -	int crc_fd;
> -	int flags;
> -
> -	enum pipe pipe;
> -	char *source;
> -};
> -
> -/**
> - * igt_require_pipe_crc:
> - *
> - * Convenience helper to check whether pipe CRC capturing is supported by the
> - * kernel. Uses igt_skip to automatically skip the test/subtest if this isn't
> - * the case.
> - */
> -void igt_require_pipe_crc(int fd)
> -{
> -	int dir;
> -	struct stat stat;
> -
> -	dir = igt_debugfs_dir(fd);
> -	igt_require_f(dir >= 0, "Could not open debugfs directory\n");
> -	igt_require_f(fstatat(dir, "crtc-0/crc/control", &stat, 0) == 0,
> -		      "CRCs not supported on this platform\n");
> -
> -	close(dir);
> -}
> -
>  static void igt_hpd_storm_exit_handler(int sig)
>  {
>  	int fd = drm_open_driver(DRIVER_INTEL);
> @@ -675,377 +488,6 @@ void igt_require_hpd_storm_ctl(int drm_fd)
>  	close(fd);
>  }
>  
> -static igt_pipe_crc_t *
> -pipe_crc_new(int fd, enum pipe pipe, const char *source, int flags)
> -{
> -	igt_pipe_crc_t *pipe_crc;
> -	char buf[128];
> -	int debugfs;
> -
> -	igt_assert(source);
> -
> -	debugfs = igt_debugfs_dir(fd);
> -	igt_assert(debugfs != -1);
> -
> -	pipe_crc = calloc(1, sizeof(struct _igt_pipe_crc));
> -	igt_assert(pipe_crc);
> -
> -	sprintf(buf, "crtc-%d/crc/control", pipe);
> -	pipe_crc->ctl_fd = openat(debugfs, buf, O_WRONLY);
> -	igt_assert(pipe_crc->ctl_fd != -1);
> -
> -	pipe_crc->crc_fd = -1;
> -	pipe_crc->fd = fd;
> -	pipe_crc->dir = debugfs;
> -	pipe_crc->pipe = pipe;
> -	pipe_crc->source = strdup(source);
> -	igt_assert(pipe_crc->source);
> -	pipe_crc->flags = flags;
> -
> -	return pipe_crc;
> -}
> -
> -/**
> - * igt_pipe_crc_new:
> - * @pipe: display pipe to use as source
> - * @source: CRC tap point to use as source
> - *
> - * This sets up a new pipe CRC capture object for the given @pipe and @source
> - * in blocking mode.
> - *
> - * Returns: A pipe CRC object for the given @pipe and @source. The library
> - * assumes that the source is always available since recent kernels support at
> - * least IGT_PIPE_CRC_SOURCE_AUTO everywhere.
> - */
> -igt_pipe_crc_t *
> -igt_pipe_crc_new(int fd, enum pipe pipe, const char *source)
> -{
> -	return pipe_crc_new(fd, pipe, source, O_RDONLY);
> -}
> -
> -/**
> - * igt_pipe_crc_new_nonblock:
> - * @pipe: display pipe to use as source
> - * @source: CRC tap point to use as source
> - *
> - * This sets up a new pipe CRC capture object for the given @pipe and @source
> - * in nonblocking mode.
> - *
> - * Returns: A pipe CRC object for the given @pipe and @source. The library
> - * assumes that the source is always available since recent kernels support at
> - * least IGT_PIPE_CRC_SOURCE_AUTO everywhere.
> - */
> -igt_pipe_crc_t *
> -igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, const char *source)
> -{
> -	return pipe_crc_new(fd, pipe, source, O_RDONLY | O_NONBLOCK);
> -}
> -
> -/**
> - * igt_pipe_crc_free:
> - * @pipe_crc: pipe CRC object
> - *
> - * Frees all resources associated with @pipe_crc.
> - */
> -void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc)
> -{
> -	if (!pipe_crc)
> -		return;
> -
> -	close(pipe_crc->ctl_fd);
> -	close(pipe_crc->crc_fd);
> -	close(pipe_crc->dir);
> -	free(pipe_crc->source);
> -	free(pipe_crc);
> -}
> -
> -static bool pipe_crc_init_from_string(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc,
> -				      const char *line)
> -{
> -	int i;
> -	const char *buf;
> -
> -	if (strncmp(line, "XXXXXXXXXX", 10) == 0)
> -		crc->has_valid_frame = false;
> -	else {
> -		crc->has_valid_frame = true;
> -		crc->frame = strtoul(line, NULL, 16);
> -	}
> -
> -	buf = line + 10;
> -	for (i = 0; *buf != '\n'; i++, buf += 11)
> -		crc->crc[i] = strtoul(buf, NULL, 16);
> -
> -	crc->n_words = i;
> -
> -	return true;
> -}
> -
> -static int read_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
> -{
> -	ssize_t bytes_read;
> -	char buf[MAX_LINE_LEN + 1];
> -
> -	igt_set_timeout(5, "CRC reading");
> -	bytes_read = read(pipe_crc->crc_fd, &buf, MAX_LINE_LEN);
> -	igt_reset_timeout();
> -
> -	if (bytes_read < 0)
> -		bytes_read = -errno;
> -	else
> -		buf[bytes_read] = '\0';
> -
> -	if (bytes_read > 0 && !pipe_crc_init_from_string(pipe_crc, out, buf))
> -		return -EINVAL;
> -
> -	return bytes_read;
> -}
> -
> -static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
> -{
> -	int ret;
> -
> -	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags & ~O_NONBLOCK);
> -
> -	do {
> -		ret = read_crc(pipe_crc, out);
> -	} while (ret == -EINTR);
> -
> -	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
> -}
> -
> -/**
> - * igt_pipe_crc_start:
> - * @pipe_crc: pipe CRC object
> - *
> - * Starts the CRC capture process on @pipe_crc.
> - */
> -void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
> -{
> -	const char *src = pipe_crc->source;
> -	struct pollfd pfd;
> -	char buf[32];
> -
> -	/* Stop first just to make sure we don't have lingering state left. */
> -	igt_pipe_crc_stop(pipe_crc);
> -
> -	igt_reset_fifo_underrun_reporting(pipe_crc->fd);
> -
> -	igt_assert_eq(write(pipe_crc->ctl_fd, src, strlen(src)), strlen(src));
> -
> -	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
> -
> -	igt_set_timeout(10, "Opening crc fd, and poll for first CRC.");
> -	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
> -	igt_assert(pipe_crc->crc_fd != -1);
> -
> -	pfd.fd = pipe_crc->crc_fd;
> -	pfd.events = POLLIN;
> -	poll(&pfd, 1, -1);
> -
> -	igt_reset_timeout();
> -
> -	errno = 0;
> -}
> -
> -/**
> - * igt_pipe_crc_stop:
> - * @pipe_crc: pipe CRC object
> - *
> - * Stops the CRC capture process on @pipe_crc.
> - */
> -void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc)
> -{
> -	close(pipe_crc->crc_fd);
> -	pipe_crc->crc_fd = -1;
> -}
> -
> -/**
> - * igt_pipe_crc_get_crcs:
> - * @pipe_crc: pipe CRC object
> - * @n_crcs: number of CRCs to capture
> - * @out_crcs: buffer pointer for the captured CRC values
> - *
> - * Read up to @n_crcs from @pipe_crc. This function does not block, and will
> - * return early if not enough CRCs can be captured, if @pipe_crc has been
> - * opened using igt_pipe_crc_new_nonblock(). It will block until @n_crcs are
> - * retrieved if @pipe_crc has been opened using igt_pipe_crc_new(). @out_crcs is
> - * alloced by this function and must be released with free() by the caller.
> - *
> - * Callers must start and stop the capturing themselves by calling
> - * igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
> - * look at igt_pipe_crc_collect_crc().
> - *
> - * Returns:
> - * The number of CRCs captured. Should be equal to @n_crcs in blocking mode, but
> - * can be less (even zero) in non-blocking mode.
> - */
> -int
> -igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
> -		      igt_crc_t **out_crcs)
> -{
> -	igt_crc_t *crcs;
> -	int n = 0;
> -
> -	crcs = calloc(n_crcs, sizeof(igt_crc_t));
> -
> -	do {
> -		igt_crc_t *crc = &crcs[n];
> -		int ret;
> -
> -		ret = read_crc(pipe_crc, crc);
> -		if (ret == -EAGAIN)
> -			break;
> -
> -		if (ret < 0)
> -			continue;
> -
> -		n++;
> -	} while (n < n_crcs);
> -
> -	*out_crcs = crcs;
> -	return n;
> -}
> -
> -static void crc_sanity_checks(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> -{
> -	int i;
> -	bool all_zero = true;
> -
> -	/* Any CRC value can be considered valid on amdgpu hardware. */
> -	if (is_amdgpu_device(pipe_crc->fd))
> -		return;
> -
> -	for (i = 0; i < crc->n_words; i++) {
> -		igt_warn_on_f(crc->crc[i] == 0xffffffff,
> -			      "Suspicious CRC: it looks like the CRC "
> -			      "read back was from a register in a powered "
> -			      "down well\n");
> -		if (crc->crc[i])
> -			all_zero = false;
> -	}
> -
> -	igt_warn_on_f(all_zero, "Suspicious CRC: All values are 0.\n");
> -}
> -
> -/**
> - * igt_pipe_crc_drain:
> - * @pipe_crc: pipe CRC object
> - *
> - * Discards all currently queued CRC values from @pipe_crc. This function does
> - * not block, and is useful to flush @pipe_crc. Afterwards you can get a fresh
> - * CRC with igt_pipe_crc_get_single().
> - */
> -void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc)
> -{
> -	int ret;
> -	igt_crc_t crc;
> -
> -	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags | O_NONBLOCK);
> -
> -	do {
> -		ret = read_crc(pipe_crc, &crc);
> -	} while (ret > 0 || ret == -EINVAL);
> -
> -	fcntl(pipe_crc->crc_fd, F_SETFL, pipe_crc->flags);
> -}
> -
> -/**
> - * igt_pipe_crc_get_single:
> - * @pipe_crc: pipe CRC object
> - * @crc: buffer pointer for the captured CRC value
> - *
> - * Read a single @crc from @pipe_crc. This function blocks even
> - * when nonblocking CRC is requested.
> - *
> - * Callers must start and stop the capturing themselves by calling
> - * igt_pipe_crc_start() and igt_pipe_crc_stop(). For one-shot CRC collecting
> - * look at igt_pipe_crc_collect_crc().
> - *
> - * If capturing has been going on for a while and a fresh crc is required,
> - * you should use igt_pipe_crc_get_current() instead.
> - */
> -void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> -{
> -	read_one_crc(pipe_crc, crc);
> -
> -	crc_sanity_checks(pipe_crc, crc);
> -}
> -
> -/**
> - * igt_pipe_crc_get_current:
> - * @drm_fd: Pointer to drm fd for vblank counter
> - * @pipe_crc: pipe CRC object
> - * @vblank: frame counter value we're looking for
> - * @crc: buffer pointer for the captured CRC value
> - *
> - * Same as igt_pipe_crc_get_single(), but will wait until a CRC has been captured
> - * for frame @vblank.
> - */
> -void
> -igt_pipe_crc_get_for_frame(int drm_fd, igt_pipe_crc_t *pipe_crc,
> -			   unsigned int vblank, igt_crc_t *crc)
> -{
> -	do {
> -		read_one_crc(pipe_crc, crc);
> -
> -		/* Only works with valid frame counter */
> -		if (!crc->has_valid_frame) {
> -			igt_pipe_crc_drain(pipe_crc);
> -			igt_pipe_crc_get_single(pipe_crc, crc);
> -			return;
> -		}
> -	} while (igt_vblank_before(crc->frame, vblank));
> -
> -	crc_sanity_checks(pipe_crc, crc);
> -}
> -
> -/**
> - * igt_pipe_crc_get_current:
> - * @drm_fd: Pointer to drm fd for vblank counter
> - * @pipe_crc: pipe CRC object
> - * @crc: buffer pointer for the captured CRC value
> - *
> - * Same as igt_pipe_crc_get_single(), but will wait until a new CRC can be captured.
> - * This is useful for retrieving the current CRC in a more race free way than
> - * igt_pipe_crc_drain() + igt_pipe_crc_get_single().
> - */
> -void
> -igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
> -{
> -	unsigned vblank = kmstest_get_vblank(drm_fd, pipe_crc->pipe, 0) + 1;
> -
> -	return igt_pipe_crc_get_for_frame(drm_fd, pipe_crc, vblank, crc);
> -}
> -
> -/**
> - * igt_pipe_crc_collect_crc:
> - * @pipe_crc: pipe CRC object
> - * @out_crc: buffer for the captured CRC values
> - *
> - * Read a single CRC from @pipe_crc. This function blocks until the CRC is
> - * retrieved, irrespective of whether @pipe_crc has been opened with
> - * igt_pipe_crc_new() or igt_pipe_crc_new_nonblock().  @out_crc must be
> - * allocated by the caller.
> - *
> - * This function takes care of the pipe_crc book-keeping, it will start/stop
> - * the collection of the CRC.
> - *
> - * This function also calls the interactive debug with the "crc" domain, so you
> - * can make use of this feature to actually see the screen that is being CRC'd.
> - *
> - * For continuous CRC collection look at igt_pipe_crc_start(),
> - * igt_pipe_crc_get_crcs() and igt_pipe_crc_stop().
> - */
> -void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc)
> -{
> -	igt_debug_wait_for_keypress("crc");
> -
> -	igt_pipe_crc_start(pipe_crc);
> -	igt_pipe_crc_get_single(pipe_crc, out_crc);
> -	igt_pipe_crc_stop(pipe_crc);
> -}
> -
>  /**
>   * igt_reset_fifo_underrun_reporting:
>   * @drm_fd: drm device file descriptor
> diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
> index cef456587641..01d332d72601 100644
> --- a/lib/igt_debugfs.h
> +++ b/lib/igt_debugfs.h
> @@ -54,63 +54,6 @@ bool igt_debugfs_search(int fd, const char *filename, const char *substring);
>  #define igt_debugfs_read(fd, filename, buf) \
>  		__igt_debugfs_read(fd, (filename), (buf), sizeof(buf))
>  
> -/*
> - * Pipe CRC
> - */
> -
> -/**
> - * igt_pipe_crc_t:
> - *
> - * Pipe CRC support structure. Needs to be allocated and set up with
> - * igt_pipe_crc_new() for a specific pipe and pipe CRC source value.
> - */
> -typedef struct _igt_pipe_crc igt_pipe_crc_t;
> -
> -#define DRM_MAX_CRC_NR 10
> -/**
> - * igt_crc_t:
> - * @frame: frame number of the capture CRC
> - * @n_words: internal field, don't access
> - * @crc: internal field, don't access
> - *
> - * Pipe CRC value. All other members than @frame are private and should not be
> - * inspected by testcases.
> - */
> -typedef struct {
> -	uint32_t frame;
> -	bool has_valid_frame;
> -	int n_words;
> -	uint32_t crc[DRM_MAX_CRC_NR];
> -} igt_crc_t;
> -
> -#define IGT_PIPE_CRC_SOURCE_AUTO "auto"
> -#define AMDGPU_PIPE_CRC_SOURCE_DPRX "dprx"
> -
> -bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index);
> -void igt_assert_crc_equal(const igt_crc_t *a, const igt_crc_t *b);
> -bool igt_check_crc_equal(const igt_crc_t *a, const igt_crc_t *b);
> -char *igt_crc_to_string_extended(igt_crc_t *crc, char delimiter, int crc_size);
> -char *igt_crc_to_string(igt_crc_t *crc);
> -
> -void igt_require_pipe_crc(int fd);
> -igt_pipe_crc_t *
> -igt_pipe_crc_new(int fd, enum pipe pipe, const char *source);
> -igt_pipe_crc_t *
> -igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, const char *source);
> -void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc);
> -void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc);
> -void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc);
> -__attribute__((warn_unused_result))
> -int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
> -			  igt_crc_t **out_crcs);
> -void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc);
> -void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> -void igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc);
> -void igt_pipe_crc_get_for_frame(int drm_fd, igt_pipe_crc_t *pipe_crc,
> -				unsigned int vblank, igt_crc_t *crc);
> -
> -void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> -
>  void igt_hpd_storm_set_threshold(int fd, unsigned int threshold);
>  void igt_hpd_storm_reset(int fd);
>  bool igt_hpd_storm_detected(int fd);
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index c61d9e7219ff..265d1fc448e6 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -41,6 +41,7 @@
>  #include "igt_debugfs.h"
>  
>  struct buf_ops;
> +typedef struct _igt_crc igt_crc_t;
>  
>  /*
>   * Internal format to denote a buffer compatible with pixman's
> diff --git a/lib/igt_pipe_crc.c b/lib/igt_pipe_crc.c
> new file mode 100644
> index 000000000000..d78807d6c65c
> --- /dev/null
> +++ b/lib/igt_pipe_crc.c
> @@ -0,0 +1,602 @@
> +/*
> + * Copyright © 2013 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +#include <inttypes.h>
> +#include <sys/stat.h>
> +#include <sys/mount.h>
> +#include <sys/sysmacros.h>
> +#include <dirent.h>
> +#include <errno.h>
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <limits.h>
> +#include <string.h>
> +#include <fcntl.h>
> +#include <unistd.h>
> +#include <poll.h>
> +
> +#include "drmtest.h"
> +#include "igt_aux.h"
> +#include "igt_kms.h"
> +#include "igt_debugfs.h"
> +#include "igt_pipe_crc.h"
> +
> +/**
> + * SECTION:igt_pipe_crc

A new section name, needs to be manually referenced from the main doc
file.

Squash this in:

diff --git a/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml b/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
index 189597c6..281a22de 100644
--- a/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
+++ b/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
@@ -35,6 +35,7 @@
     <xi:include href="xml/igt_list.xml"/>
     <xi:include href="xml/igt_map.xml"/>
     <xi:include href="xml/igt_msm.xml"/>
+    <xi:include href="xml/igt_pipe_crc.xml"/>
     <xi:include href="xml/igt_pm.xml"/>
     <xi:include href="xml/igt_primes.xml"/>
     <xi:include href="xml/igt_rand.xml"/>



-- 
Petri Latvala

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/
  2021-10-20 10:16 [igt-dev] [PATCH i-g-t v2 1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
  2021-10-20 10:16 ` [igt-dev] [PATCH i-g-t v2 2/3] tests/crc: s/"auto"/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
  2021-10-20 10:16 ` [igt-dev] [PATCH i-g-t v2 3/3] lib/crc: Move pipe CRC stuff out from igt_debugfs Ville Syrjala
@ 2021-10-20 11:13 ` Patchwork
  2021-10-20 13:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2021-10-20 11:13 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 6213 bytes --]

== Series Details ==

Series: series starting with [i-g-t,v2,1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/
URL   : https://patchwork.freedesktop.org/series/96049/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10763 -> IGTPW_6338
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/index.html

Known issues
------------

  Here are the changes found in IGTPW_6338 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@query-info:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][1] ([fdo#109315])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@amdgpu/amd_basic@query-info.html
    - fi-kbl-soraka:      NOTRUN -> [SKIP][2] ([fdo#109271])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-kbl-soraka/igt@amdgpu/amd_basic@query-info.html

  * igt@amdgpu/amd_basic@semaphore:
    - fi-bdw-5557u:       NOTRUN -> [SKIP][3] ([fdo#109271]) +23 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-bdw-5557u/igt@amdgpu/amd_basic@semaphore.html

  * igt@amdgpu/amd_cs_nop@nop-gfx0:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][4] ([fdo#109315] / [i915#2575]) +16 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@amdgpu/amd_cs_nop@nop-gfx0.html

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
    - fi-snb-2600:        NOTRUN -> [SKIP][5] ([fdo#109271]) +17 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-snb-2600/igt@amdgpu/amd_cs_nop@sync-fork-compute0.html

  * igt@gem_huc_copy@huc-copy:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@gem_huc_copy@huc-copy.html

  * igt@i915_pm_backlight@basic-brightness:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][7] ([i915#1155])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@i915_pm_backlight@basic-brightness.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][8] ([fdo#111827]) +8 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][9] ([i915#4103]) +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][10] ([fdo#109285])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_psr@primary_mmap_gtt:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][11] ([i915#1072]) +3 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html

  * igt@prime_vgem@basic-userptr:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][12] ([i915#3301])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-tgl-1115g4/igt@prime_vgem@basic-userptr.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - fi-snb-2600:        [INCOMPLETE][13] ([i915#3921]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/fi-snb-2600/igt@i915_selftest@live@hangcheck.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-snb-2600/igt@i915_selftest@live@hangcheck.html

  * igt@kms_flip@basic-flip-vs-modeset@c-dp1:
    - fi-cfl-8109u:       [FAIL][15] ([i915#4165]) -> [PASS][16] +1 similar issue
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/fi-cfl-8109u/igt@kms_flip@basic-flip-vs-modeset@c-dp1.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-cfl-8109u/igt@kms_flip@basic-flip-vs-modeset@c-dp1.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
    - fi-cfl-8109u:       [DMESG-WARN][17] ([i915#295]) -> [PASS][18] +18 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4165]: https://gitlab.freedesktop.org/drm/intel/issues/4165
  [i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541


Participating hosts (37 -> 36)
------------------------------

  Additional (1): fi-tgl-1115g4 
  Missing    (2): fi-bsw-cyan bat-dg1-6 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_6257 -> IGTPW_6338

  CI-20190529: 20190529
  CI_DRM_10763: 4ee44225b0be875097a80b06ed976f27c87b1368 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6338: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/index.html
  IGT_6257: 5e32858ad62342f9ae5207e0432bf6f4c896d165 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/index.html

[-- Attachment #2: Type: text/html, Size: 7327 bytes --]

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

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,v2,1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/
  2021-10-20 10:16 [igt-dev] [PATCH i-g-t v2 1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
                   ` (2 preceding siblings ...)
  2021-10-20 11:13 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/ Patchwork
@ 2021-10-20 13:24 ` Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2021-10-20 13:24 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 30316 bytes --]

== Series Details ==

Series: series starting with [i-g-t,v2,1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/
URL   : https://patchwork.freedesktop.org/series/96049/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10763_full -> IGTPW_6338_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_6338_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_6338_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_6338_full:

### IGT changes ###

#### Possible regressions ####

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-suspend.html

  
Known issues
------------

  Here are the changes found in IGTPW_6338_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_create@create-massive:
    - shard-tglb:         NOTRUN -> [DMESG-WARN][3] ([i915#3002])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb6/igt@gem_create@create-massive.html

  * igt@gem_ctx_isolation@preservation-s3@vcs0:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][4] ([i915#180]) +5 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl6/igt@gem_ctx_isolation@preservation-s3@vcs0.html

  * igt@gem_ctx_param@set-priority-not-supported:
    - shard-tglb:         NOTRUN -> [SKIP][5] ([fdo#109314])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb8/igt@gem_ctx_param@set-priority-not-supported.html

  * igt@gem_ctx_persistence@engines-mixed:
    - shard-snb:          NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#1099]) +6 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-snb6/igt@gem_ctx_persistence@engines-mixed.html

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [PASS][7] -> [TIMEOUT][8] ([i915#2369] / [i915#3063] / [i915#3648])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-tglb2/igt@gem_eio@unwedge-stress.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb2/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-glk:          [PASS][9] -> [FAIL][10] ([i915#2846])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-glk7/igt@gem_exec_fair@basic-deadline.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk4/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-none-vip@rcs0:
    - shard-tglb:         NOTRUN -> [FAIL][11] ([i915#2842]) +6 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb1/igt@gem_exec_fair@basic-none-vip@rcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-kbl:          [PASS][12] -> [SKIP][13] ([fdo#109271]) +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl4/igt@gem_exec_fair@basic-pace@rcs0.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl4/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
    - shard-iclb:         NOTRUN -> [FAIL][14] ([i915#2842]) +5 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb2/igt@gem_exec_fair@basic-pace@vcs1.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-glk:          [PASS][15] -> [FAIL][16] ([i915#2842]) +2 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-glk5/igt@gem_exec_fair@basic-pace@vecs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk5/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_params@secure-non-root:
    - shard-iclb:         NOTRUN -> [SKIP][17] ([fdo#112283])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb6/igt@gem_exec_params@secure-non-root.html

  * igt@gem_exec_whisper@basic-queues-forked-all:
    - shard-glk:          [PASS][18] -> [DMESG-WARN][19] ([i915#118]) +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-glk9/igt@gem_exec_whisper@basic-queues-forked-all.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk6/igt@gem_exec_whisper@basic-queues-forked-all.html

  * igt@gem_huc_copy@huc-copy:
    - shard-tglb:         [PASS][20] -> [SKIP][21] ([i915#2190])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-tglb2/igt@gem_huc_copy@huc-copy.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb6/igt@gem_huc_copy@huc-copy.html

  * igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-yf-tiled:
    - shard-glk:          NOTRUN -> [SKIP][22] ([fdo#109271]) +51 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk7/igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-yf-tiled.html
    - shard-iclb:         NOTRUN -> [SKIP][23] ([i915#768]) +1 similar issue
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb2/igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-yf-tiled.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-snb:          NOTRUN -> [FAIL][24] ([i915#2724])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-snb6/igt@gem_userptr_blits@vma-merge.html

  * igt@gen9_exec_parse@cmd-crossing-page:
    - shard-tglb:         NOTRUN -> [SKIP][25] ([i915#2856])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb2/igt@gen9_exec_parse@cmd-crossing-page.html
    - shard-iclb:         NOTRUN -> [SKIP][26] ([i915#2856])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb4/igt@gen9_exec_parse@cmd-crossing-page.html

  * igt@i915_pm_dc@dc6-dpms:
    - shard-kbl:          NOTRUN -> [FAIL][27] ([i915#454])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl6/igt@i915_pm_dc@dc6-dpms.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
    - shard-apl:          NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#1937])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl3/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html

  * igt@i915_suspend@sysfs-reader:
    - shard-apl:          [PASS][29] -> [DMESG-WARN][30] ([i915#180])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-apl3/igt@i915_suspend@sysfs-reader.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl6/igt@i915_suspend@sysfs-reader.html
    - shard-kbl:          [PASS][31] -> [DMESG-WARN][32] ([i915#180]) +1 similar issue
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl3/igt@i915_suspend@sysfs-reader.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl7/igt@i915_suspend@sysfs-reader.html

  * igt@kms_big_fb@x-tiled-8bpp-rotate-90:
    - shard-tglb:         NOTRUN -> [SKIP][33] ([fdo#111614])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb8/igt@kms_big_fb@x-tiled-8bpp-rotate-90.html
    - shard-iclb:         NOTRUN -> [SKIP][34] ([fdo#110725] / [fdo#111614])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb7/igt@kms_big_fb@x-tiled-8bpp-rotate-90.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip:
    - shard-kbl:          NOTRUN -> [SKIP][35] ([fdo#109271] / [i915#3777])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl3/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip.html

  * igt@kms_big_fb@yf-tiled-32bpp-rotate-270:
    - shard-tglb:         NOTRUN -> [SKIP][36] ([fdo#111615]) +1 similar issue
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb2/igt@kms_big_fb@yf-tiled-32bpp-rotate-270.html

  * igt@kms_big_fb@yf-tiled-8bpp-rotate-0:
    - shard-iclb:         NOTRUN -> [SKIP][37] ([fdo#110723])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb7/igt@kms_big_fb@yf-tiled-8bpp-rotate-0.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip:
    - shard-apl:          NOTRUN -> [SKIP][38] ([fdo#109271] / [i915#3777]) +2 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl6/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0:
    - shard-apl:          NOTRUN -> [SKIP][39] ([fdo#109271]) +274 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl1/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0.html

  * igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:
    - shard-kbl:          NOTRUN -> [SKIP][40] ([fdo#109271] / [i915#3886]) +7 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl2/igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][41] ([i915#3689]) +4 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb6/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_ccs.html

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
    - shard-apl:          NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#3886]) +17 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl7/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
    - shard-glk:          NOTRUN -> [SKIP][43] ([fdo#109271] / [i915#3886]) +1 similar issue
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk3/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html
    - shard-tglb:         NOTRUN -> [SKIP][44] ([i915#3689] / [i915#3886]) +1 similar issue
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb8/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html
    - shard-iclb:         NOTRUN -> [SKIP][45] ([fdo#109278] / [i915#3886]) +2 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb7/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html

  * igt@kms_cdclk@mode-transition:
    - shard-tglb:         NOTRUN -> [SKIP][46] ([i915#3742])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb3/igt@kms_cdclk@mode-transition.html

  * igt@kms_chamelium@hdmi-hpd-enable-disable-mode:
    - shard-iclb:         NOTRUN -> [SKIP][47] ([fdo#109284] / [fdo#111827]) +3 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb8/igt@kms_chamelium@hdmi-hpd-enable-disable-mode.html

  * igt@kms_chamelium@hdmi-hpd-for-each-pipe:
    - shard-kbl:          NOTRUN -> [SKIP][48] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl3/igt@kms_chamelium@hdmi-hpd-for-each-pipe.html
    - shard-glk:          NOTRUN -> [SKIP][49] ([fdo#109271] / [fdo#111827]) +5 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk1/igt@kms_chamelium@hdmi-hpd-for-each-pipe.html

  * igt@kms_chamelium@vga-hpd:
    - shard-apl:          NOTRUN -> [SKIP][50] ([fdo#109271] / [fdo#111827]) +21 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl7/igt@kms_chamelium@vga-hpd.html

  * igt@kms_color_chamelium@pipe-a-ctm-blue-to-red:
    - shard-snb:          NOTRUN -> [SKIP][51] ([fdo#109271] / [fdo#111827]) +15 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-snb6/igt@kms_color_chamelium@pipe-a-ctm-blue-to-red.html

  * igt@kms_color_chamelium@pipe-c-degamma:
    - shard-tglb:         NOTRUN -> [SKIP][52] ([fdo#109284] / [fdo#111827]) +3 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb8/igt@kms_color_chamelium@pipe-c-degamma.html

  * igt@kms_content_protection@atomic:
    - shard-apl:          NOTRUN -> [TIMEOUT][53] ([i915#1319])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl6/igt@kms_content_protection@atomic.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-tglb:         NOTRUN -> [INCOMPLETE][54] ([i915#2411] / [i915#2828] / [i915#456])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-c-cursor-32x10-rapid-movement:
    - shard-tglb:         NOTRUN -> [SKIP][55] ([i915#3359]) +1 similar issue
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb5/igt@kms_cursor_crc@pipe-c-cursor-32x10-rapid-movement.html

  * igt@kms_cursor_crc@pipe-d-cursor-32x32-rapid-movement:
    - shard-tglb:         NOTRUN -> [SKIP][56] ([i915#3319])
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb3/igt@kms_cursor_crc@pipe-d-cursor-32x32-rapid-movement.html

  * igt@kms_cursor_crc@pipe-d-cursor-512x170-offscreen:
    - shard-tglb:         NOTRUN -> [SKIP][57] ([fdo#109279] / [i915#3359]) +4 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb6/igt@kms_cursor_crc@pipe-d-cursor-512x170-offscreen.html

  * igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions:
    - shard-tglb:         NOTRUN -> [SKIP][58] ([i915#4103])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb3/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-apl:          NOTRUN -> [DMESG-WARN][59] ([i915#180]) +1 similar issue
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl2/igt@kms_flip@flip-vs-suspend@a-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
    - shard-glk:          NOTRUN -> [SKIP][60] ([fdo#109271] / [i915#2672])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile:
    - shard-snb:          NOTRUN -> [SKIP][61] ([fdo#109271]) +425 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-snb5/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-move:
    - shard-iclb:         NOTRUN -> [SKIP][62] ([fdo#109280]) +8 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-move.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-kbl:          NOTRUN -> [SKIP][63] ([fdo#109271]) +112 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-move:
    - shard-tglb:         NOTRUN -> [SKIP][64] ([fdo#111825]) +17 similar issues
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb1/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-move.html

  * igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes:
    - shard-iclb:         NOTRUN -> [SKIP][65] ([fdo#109289])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb5/igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes.html
    - shard-tglb:         NOTRUN -> [SKIP][66] ([fdo#109289])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb3/igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes.html

  * igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
    - shard-apl:          NOTRUN -> [SKIP][67] ([fdo#109271] / [i915#533]) +2 similar issues
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl2/igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-d-frame-sequence:
    - shard-kbl:          NOTRUN -> [SKIP][68] ([fdo#109271] / [i915#533]) +1 similar issue
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl2/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-d-frame-sequence.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-apl:          NOTRUN -> [FAIL][69] ([fdo#108145] / [i915#265]) +3 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl1/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb:
    - shard-apl:          NOTRUN -> [FAIL][70] ([i915#265])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl1/igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb.html

  * igt@kms_plane_lowres@pipe-b-tiling-none:
    - shard-tglb:         NOTRUN -> [SKIP][71] ([i915#3536])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb7/igt@kms_plane_lowres@pipe-b-tiling-none.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4:
    - shard-apl:          NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#658]) +3 similar issues
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl1/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-2:
    - shard-tglb:         NOTRUN -> [SKIP][73] ([i915#2920]) +1 similar issue
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb2/igt@kms_psr2_sf@plane-move-sf-dmg-area-2.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-4:
    - shard-glk:          NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#658]) +1 similar issue
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk8/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-4.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-kbl:          NOTRUN -> [SKIP][75] ([fdo#109271] / [i915#658])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl6/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [PASS][76] -> [SKIP][77] ([fdo#109441]) +2 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb6/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_vblank@pipe-d-ts-continuation-modeset-rpm:
    - shard-iclb:         NOTRUN -> [SKIP][78] ([fdo#109278]) +8 similar issues
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb7/igt@kms_vblank@pipe-d-ts-continuation-modeset-rpm.html

  * igt@kms_writeback@writeback-fb-id:
    - shard-glk:          NOTRUN -> [SKIP][79] ([fdo#109271] / [i915#2437])
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk1/igt@kms_writeback@writeback-fb-id.html

  * igt@kms_writeback@writeback-invalid-parameters:
    - shard-apl:          NOTRUN -> [SKIP][80] ([fdo#109271] / [i915#2437])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl8/igt@kms_writeback@writeback-invalid-parameters.html

  * igt@prime_nv_test@i915_import_pread_pwrite:
    - shard-tglb:         NOTRUN -> [SKIP][81] ([fdo#109291]) +1 similar issue
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb6/igt@prime_nv_test@i915_import_pread_pwrite.html

  * igt@sysfs_clients@create:
    - shard-tglb:         NOTRUN -> [SKIP][82] ([i915#2994]) +1 similar issue
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-tglb7/igt@sysfs_clients@create.html
    - shard-iclb:         NOTRUN -> [SKIP][83] ([i915#2994])
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb1/igt@sysfs_clients@create.html

  * igt@sysfs_clients@fair-1:
    - shard-apl:          NOTRUN -> [SKIP][84] ([fdo#109271] / [i915#2994]) +5 similar issues
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl3/igt@sysfs_clients@fair-1.html

  * igt@sysfs_clients@split-50:
    - shard-kbl:          NOTRUN -> [SKIP][85] ([fdo#109271] / [i915#2994])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl4/igt@sysfs_clients@split-50.html

  * igt@sysfs_timeslice_duration@timeout@vcs0:
    - shard-apl:          [PASS][86] -> [FAIL][87] ([i915#1755])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-apl7/igt@sysfs_timeslice_duration@timeout@vcs0.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl3/igt@sysfs_timeslice_duration@timeout@vcs0.html

  
#### Possible fixes ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         [SKIP][88] ([i915#658]) -> [PASS][89]
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-iclb6/igt@feature_discovery@psr2.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb2/igt@feature_discovery@psr2.html

  * igt@gem_exec_fair@basic-none-vip@rcs0:
    - shard-kbl:          [FAIL][90] ([i915#2842]) -> [PASS][91] +2 similar issues
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl6/igt@gem_exec_fair@basic-none-vip@rcs0.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl1/igt@gem_exec_fair@basic-none-vip@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - shard-apl:          [FAIL][92] ([i915#2842]) -> [PASS][93]
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-apl3/igt@gem_exec_fair@basic-none@vcs0.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl2/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [FAIL][94] ([i915#2842]) -> [PASS][95]
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-glk6/igt@gem_exec_fair@basic-throttle@rcs0.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk8/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_whisper@basic-contexts-forked-all:
    - shard-glk:          [DMESG-WARN][96] ([i915#118]) -> [PASS][97] +1 similar issue
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-glk9/igt@gem_exec_whisper@basic-contexts-forked-all.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-glk9/igt@gem_exec_whisper@basic-contexts-forked-all.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-kbl:          [INCOMPLETE][98] ([i915#180] / [i915#636]) -> [PASS][99]
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl6/igt@kms_fbcon_fbt@fbc-suspend.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl3/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile:
    - shard-iclb:         [SKIP][100] ([i915#3701]) -> [PASS][101]
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb7/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [DMESG-WARN][102] ([i915#180]) -> [PASS][103] +1 similar issue
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-apl:          [DMESG-WARN][104] ([i915#180]) -> [PASS][105]
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-apl8/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl8/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [SKIP][106] ([fdo#109441]) -> [PASS][107] +1 similar issue
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-iclb8/igt@kms_psr@psr2_no_drrs.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

  
#### Warnings ####

  * igt@i915_pm_rc6_residency@rc6-fence:
    - shard-iclb:         [WARN][108] ([i915#1804] / [i915#2684]) -> [WARN][109] ([i915#2684])
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-iclb4/igt@i915_pm_rc6_residency@rc6-fence.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb8/igt@i915_pm_rc6_residency@rc6-fence.html

  * igt@i915_pm_rc6_residency@rc6-idle:
    - shard-iclb:         [WARN][110] ([i915#2684]) -> [WARN][111] ([i915#1804] / [i915#2684])
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-iclb1/igt@i915_pm_rc6_residency@rc6-idle.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb7/igt@i915_pm_rc6_residency@rc6-idle.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-kbl:          [INCOMPLETE][112] ([i915#2828]) -> [DMESG-WARN][113] ([i915#180])
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_psr2_sf@cursor-plane-update-sf:
    - shard-iclb:         [SKIP][114] ([i915#658]) -> [SKIP][115] ([i915#2920])
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-iclb1/igt@kms_psr2_sf@cursor-plane-update-sf.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb2/igt@kms_psr2_sf@cursor-plane-update-sf.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5:
    - shard-iclb:         [SKIP][116] ([i915#2920]) -> [SKIP][117] ([i915#658]) +1 similar issue
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-iclb2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-iclb1/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5.html

  * igt@runner@aborted:
    - shard-kbl:          ([FAIL][118], [FAIL][119], [FAIL][120], [FAIL][121], [FAIL][122]) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312] / [i915#92]) -> ([FAIL][123], [FAIL][124], [FAIL][125], [FAIL][126], [FAIL][127], [FAIL][128], [FAIL][129], [FAIL][130]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312])
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl6/igt@runner@aborted.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl4/igt@runner@aborted.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl6/igt@runner@aborted.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl7/igt@runner@aborted.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-kbl7/igt@runner@aborted.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl7/igt@runner@aborted.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl4/igt@runner@aborted.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl7/igt@runner@aborted.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl6/igt@runner@aborted.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl4/igt@runner@aborted.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl7/igt@runner@aborted.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl1/igt@runner@aborted.html
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-kbl6/igt@runner@aborted.html
    - shard-apl:          ([FAIL][131], [FAIL][132]) ([fdo#109271] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312]) -> ([FAIL][133], [FAIL][134], [FAIL][135]) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312])
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-apl8/igt@runner@aborted.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10763/shard-apl2/igt@runner@aborted.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl2/igt@runner@aborted.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl7/igt@runner@aborted.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/shard-apl6/igt@runner@aborted.html

  
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#110725]: https://bugs.freedesktop.org/show_bug.cgi?id=110725
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
  [i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6338/index.html

[-- Attachment #2: Type: text/html, Size: 36296 bytes --]

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

end of thread, other threads:[~2021-10-20 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 10:16 [igt-dev] [PATCH i-g-t v2 1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
2021-10-20 10:16 ` [igt-dev] [PATCH i-g-t v2 2/3] tests/crc: s/"auto"/IGT_PIPE_CRC_SOURCE_AUTO/ Ville Syrjala
2021-10-20 10:16 ` [igt-dev] [PATCH i-g-t v2 3/3] lib/crc: Move pipe CRC stuff out from igt_debugfs Ville Syrjala
2021-10-20 10:39   ` Petri Latvala
2021-10-20 11:13 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/3] lib/crc: s/INTEL_PIPE_CRC_SOURCE_AUTO/IGT_PIPE_CRC_SOURCE_AUTO/ Patchwork
2021-10-20 13:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.