From: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: swati2.sharma@intel.com,
Naladala Ramanaidu <ramanaidu.naladala@intel.com>
Subject: [PATCH i-g-t v1 1/2] tests/kms_atomic: Add necessary checks to ensure proper cleanup
Date: Sat, 1 Feb 2025 00:46:12 +0530 [thread overview]
Message-ID: <20250131191613.447979-2-ramanaidu.naladala@intel.com> (raw)
In-Reply-To: <20250131191613.447979-1-ramanaidu.naladala@intel.com>
Stop CRC and free up CRC resources to prevent memory leaks.
Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
---
tests/kms_atomic.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index 489b0d709..8fb26a079 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -506,6 +506,10 @@ plane_immutable_zpos(data_t *data, igt_output_t *output, enum pipe pipe, int n_p
DRM_FORMAT_XRGB8888,
DRM_FORMAT_MOD_LINEAR,
0.0, 0.0, 1.0, &fb_lower);
+ if (!fb_id_lower) {
+ igt_pipe_crc_stop(pipe_crc);
+ igt_pipe_crc_free(pipe_crc);
+ }
igt_assert(fb_id_lower);
fb_id_upper = igt_create_color_fb(data->drm_fd,
@@ -513,6 +517,10 @@ plane_immutable_zpos(data_t *data, igt_output_t *output, enum pipe pipe, int n_p
DRM_FORMAT_XRGB8888,
DRM_FORMAT_MOD_LINEAR,
1.0, 1.0, 0.0, &fb_upper);
+ if (!fb_id_upper) {
+ igt_pipe_crc_stop(pipe_crc);
+ igt_pipe_crc_free(pipe_crc);
+ }
igt_assert(fb_id_upper);
/*
@@ -560,6 +568,8 @@ plane_immutable_zpos(data_t *data, igt_output_t *output, enum pipe pipe, int n_p
igt_plane_set_fb(plane_upper, NULL);
}
+ igt_pipe_crc_stop(pipe_crc);
+ igt_pipe_crc_free(pipe_crc);
igt_remove_fb(data->drm_fd, &fb_ref);
igt_remove_fb(data->drm_fd, &fb_lower);
igt_remove_fb(data->drm_fd, &fb_upper);
--
2.25.1
next prev parent reply other threads:[~2025-01-31 19:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 19:16 [PATCH i-g-t v1 0/2] tests/kms_atomic: Free up CRC resources Naladala Ramanaidu
2025-01-31 19:16 ` Naladala Ramanaidu [this message]
2025-02-07 6:35 ` [PATCH i-g-t v1 1/2] tests/kms_atomic: Add necessary checks to ensure proper cleanup Samala, Pranay
2025-02-09 18:52 ` Sharma, Swati2
2025-01-31 19:16 ` [PATCH i-g-t v1 2/2] HAX patch do not merge Naladala Ramanaidu
2025-01-31 19:30 ` ✓ i915.CI.BAT: success for tests/kms_atomic: Free up CRC resources Patchwork
2025-01-31 19:40 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-01 3:44 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-01 10:54 ` ✗ 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=20250131191613.447979-2-ramanaidu.naladala@intel.com \
--to=ramanaidu.naladala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@intel.com \
/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