[igt-dev] [PATCH i-g-t 4/6] tests/kms_flip_scaled_crc: Clean up pipe crc before subtest

Ville Syrjala ville.syrjala at linux.intel.com
Fri Apr 16 17:53:10 UTC 2021


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

If the previous subtest fails/skips we leave the pipe crc
running, which then causes the next subtest to fail when
it tries to enable the already enabled crc. Avoid this by
cleaning up the old crc leftovers first.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_flip_scaled_crc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_flip_scaled_crc.c b/tests/kms_flip_scaled_crc.c
index b70be6f03bce..e94f083c5b9d 100644
--- a/tests/kms_flip_scaled_crc.c
+++ b/tests/kms_flip_scaled_crc.c
@@ -145,6 +145,10 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
 				  NULL);
+	if (data->pipe_crc) {
+		igt_pipe_crc_stop(data->pipe_crc);
+		igt_pipe_crc_free(data->pipe_crc);
+	}
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
 					  INTEL_PIPE_CRC_SOURCE_AUTO);
 
-- 
2.26.3



More information about the igt-dev mailing list