From: Kunal Joshi <kunal1.joshi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>
Subject: [PATCH i-g-t 4/6] tests/kms_pipe_crc_basic: Use cleanup framework for pipe CRC
Date: Mon, 2 Feb 2026 14:15:37 +0530 [thread overview]
Message-ID: <20260202084539.2524306-5-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20260202084539.2524306-1-kunal1.joshi@intel.com>
Register pipe CRC resources with igt_cleanup_register_pipe_crc() after
creation. The exit handler will automatically clean up registered CRC
resources on test exit.
Remove manual igt_pipe_crc_free() calls at end of test functions since
the cleanup framework handles this automatically.
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
tests/kms_pipe_crc_basic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 455b44d38..386cb15ef 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -275,6 +275,7 @@ static void test_compare_crc(data_t *data, enum pipe pipe, igt_output_t *output,
pipe_crc = igt_crtc_crc_new(igt_crtc_for_pipe(&data->display, pipe),
IGT_PIPE_CRC_SOURCE_AUTO);
+ igt_cleanup_register_pipe_crc(pipe_crc);
igt_pipe_crc_collect_crc(pipe_crc, &ref_crc);
/* Flip FB1 with the primary plane & compare the CRC with ref CRC. */
@@ -285,7 +286,6 @@ static void test_compare_crc(data_t *data, enum pipe pipe, igt_output_t *output,
igt_assert_crc_equal(&crc, &ref_crc);
/* Clean-up */
- igt_pipe_crc_free(pipe_crc);
igt_plane_set_fb(primary, NULL);
igt_output_set_crtc(output, NULL);
igt_display_commit(display);
@@ -302,6 +302,7 @@ static void test_disable_crc_after_crtc(data_t *data, enum pipe pipe,
pipe_crc = igt_crtc_crc_new(igt_crtc_for_pipe(&data->display, pipe),
IGT_PIPE_CRC_SOURCE_AUTO);
+ igt_cleanup_register_pipe_crc(pipe_crc);
igt_display_reset(display);
igt_output_set_crtc(output, igt_crtc_for_pipe(output->display, pipe));
@@ -331,7 +332,6 @@ static void test_disable_crc_after_crtc(data_t *data, enum pipe pipe,
igt_assert_crc_equal(&crc[0], &crc[1]);
/* Clean-up */
- igt_pipe_crc_free(pipe_crc);
igt_plane_set_fb(primary, NULL);
igt_output_set_crtc(output, NULL);
igt_display_commit(display);
--
2.43.0
next prev parent reply other threads:[~2026-02-02 8:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 8:45 [PATCH i-g-t 0/6] tests/kms_pipe_crc_basic: add mst suspend-resume test Kunal Joshi
2026-02-02 8:45 ` [PATCH i-g-t 1/6] tests/intel/kms_mst_helper: Add helper to check for MST outputs Kunal Joshi
2026-02-02 8:45 ` [PATCH i-g-t 2/6] lib/igt_cleanup: Add general resource cleanup infrastructure Kunal Joshi
2026-02-02 8:45 ` [PATCH i-g-t 3/6] tests/kms_pipe_crc_basic: Use cleanup framework for framebuffers Kunal Joshi
2026-02-02 8:45 ` Kunal Joshi [this message]
2026-02-02 8:45 ` [PATCH i-g-t 5/6] tests/kms_pipe_crc_basic: Use cleanup framework for drm_fd Kunal Joshi
2026-02-02 8:45 ` [PATCH i-g-t 6/6] tests/kms_pipe_crc_basic: Add MST suspend-resume test Kunal Joshi
2026-02-04 10:40 ` Bilal, Mohammed
2026-02-03 0:13 ` ✓ Xe.CI.BAT: success for tests/kms_pipe_crc_basic: add mst suspend-resume test (rev3) Patchwork
2026-02-03 0:19 ` ✓ i915.CI.BAT: " Patchwork
2026-02-03 7:54 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-03 8:55 ` ✗ i915.CI.Full: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260202084539.2524306-5-kunal1.joshi@intel.com \
--to=kunal1.joshi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox