Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pranay Samala <pranay.samala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, sameer.lattannavar@intel.com,
	pranay.samala@intel.com
Subject: [PATCH i-g-t] tests/kms_atomic_transition: Fix retry-path resources in modeset tests
Date: Wed, 24 Jun 2026 00:12:33 +0530	[thread overview]
Message-ID: <20260623184233.3015156-1-pranay.samala@intel.com> (raw)

When a bandwidth fallback retry happens, resources from
previous attempt may not be released, leading to accumulation
of allocated objects across retries.

Add cleanup before retry to ensure clean starting state by
releasing resources and removing allocated framebuffers,
preventing resource buildup.

Signed-off-by: Pranay Samala <pranay.samala@intel.com>
---
 tests/kms_atomic_transition.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 58cadc560..37dc77c28 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -1026,6 +1026,16 @@ retry:
 		bool found = igt_override_all_active_output_modes_to_fit_bw(&data->display);
 		igt_require_f(found, "No valid mode combo found.\n");
 
+		if (is_intel_device(data->drm_fd)) {
+			for_each_crtc(&data->display, crtc) {
+				igt_pipe_crc_free(data->pipe_crcs[crtc->crtc_index]);
+				data->pipe_crcs[crtc->crtc_index] = NULL;
+			}
+		}
+
+		igt_remove_fb(data->drm_fd, &data->fbs[0]);
+		igt_remove_fb(data->drm_fd, &data->fbs[1]);
+
 		goto retry;
 	}
 	igt_display_commit2(&data->display, COMMIT_ATOMIC);
-- 
2.34.1


             reply	other threads:[~2026-06-23 18:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 18:42 Pranay Samala [this message]
2026-06-23 19:14 ` ✓ Xe.CI.BAT: success for tests/kms_atomic_transition: Fix retry-path resources in modeset tests Patchwork
2026-06-23 19:54 ` ✓ i915.CI.BAT: " Patchwork
2026-06-24  2:46 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-06-24  3:39 ` [PATCH i-g-t] " Reddy Guddati, Santhosh
2026-06-24  6:36 ` ✓ i915.CI.Full: success for " 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=20260623184233.3015156-1-pranay.samala@intel.com \
    --to=pranay.samala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@intel.com \
    --cc=sameer.lattannavar@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