summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_crc.c
diff options
context:
space:
mode:
authorMelissa Wen <melissa.srw@gmail.com>2020-07-16 08:25:21 -0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-07-20 17:51:24 +0300
commit96a8c8c1371995b73916989880b29b01f5657ba3 (patch)
tree7f73a80ded2f5de9d76cc47e1b2f5b613b9b5299 /tests/kms_cursor_crc.c
parent6663e3ab5f77add7077711c2b649caf2bd7903c4 (diff)
test/kms_cursor_crc: release old pipe_crc before create a new one
When a subtest fails, it skips the cleanup, and its pipe_crc remains allocated. As a consequence, the following subtest also fails (timeout) when trying to create a new one. This patch releases any remaining pipe_crc to enable the creation of a new one for the next subtest. Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tests/kms_cursor_crc.c')
-rw-r--r--tests/kms_cursor_crc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 521f2b9c..5b7f1bd9 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -423,6 +423,8 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
igt_display_commit(display);
/* create the pipe_crc object for this pipe */
+ 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);