summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2021-04-16 04:14:38 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2021-04-21 01:12:59 +0300
commit90d99bac3c2fea9b7ac5441328fcf4da868a69fa (patch)
tree201457b91e5db668a07f60315bd4e8092bdc7ab7
parent0ffdba41d60e4e9ab67abba72b3cfb4324b17cdc (diff)
tests/kms_flip_scaled_crc: Clean up pipe crc before subtest
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@linux.intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
-rw-r--r--tests/kms_flip_scaled_crc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/kms_flip_scaled_crc.c b/tests/kms_flip_scaled_crc.c
index b70be6f0..e94f083c 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);