From: "Juha-Pekka Heikkilä" <juhapekka.heikkila@gmail.com>
To: Luca Coelho <luciano.coelho@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 3/3] tests/kms_universal_plane: count FBs after the first commit
Date: Fri, 27 Nov 2026 17:04:19 +0200 [thread overview]
Message-ID: <4dabc04c-efde-4265-85fb-ebc75f2d2bc0@gmail.com> (raw)
In-Reply-To: <20261126093003.492469-4-luciano.coelho@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
On 26/11/2026 10.48, Luca Coelho wrote:
> cursor_leak_test_crtc() counts the framebuffers before creating its
> own FBs and again after releasing them, and expects the same number.
> If an earlier test left an FB on screen, for instance because
> kms_cursor_crc failed before cleaning up, that FB is included in the
> first count but our first commit releases it. The second count is
> then one lower and the test fails the count1 == count2 assertion,
> even though nothing leaked.
>
> Take the first count after the first commit instead, after waiting
> for the same 2 vblanks as before the second count so that the old FB
> is really gone, and subtract our own FBs, which already exist at that
> point.
>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
> tests/kms_universal_plane.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
> index b01fb3d756f7..291e4a6e3422 100644
> --- a/tests/kms_universal_plane.c
> +++ b/tests/kms_universal_plane.c
> @@ -650,9 +650,6 @@ cursor_leak_test_crtc(data_t *data, igt_crtc_t *crtc, igt_output_t *output)
> igt_output_set_crtc(output, crtc);
> mode = igt_output_get_mode(output);
>
> - /* Count GEM framebuffers before creating our cursor FB's */
> - count1 = intel_gem_fb_count(data);
> -
> /* Black background FB */
> igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
> DRM_FORMAT_XRGB8888,
> @@ -684,6 +681,14 @@ cursor_leak_test_crtc(data_t *data, igt_crtc_t *crtc, igt_output_t *output)
> igt_plane_set_fb(primary, &background_fb);
> igt_display_commit2(display, COMMIT_LEGACY);
>
> + /*
> + * Count after our first commit, which releases FBs left by earlier
> + * tests, and don't count our own FBs. This assumes one line per FB
> + * in the debugfs file, since intel_gem_fb_count() counts the lines.
> + */
> + igt_wait_for_vblank_count(crtc, 2);
> + count1 = intel_gem_fb_count(data) - (ARRAY_SIZE(cursor_fb) + 1);
> +
> igt_plane_set_position(cursor, 100, 100);
>
> /*
next prev parent reply other threads:[~2026-11-27 15:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 8:48 [PATCH i-g-t 0/3] tests/kms: don't fail cursor-fb-leak because of leftover FBs Luca Coelho
2026-11-26 8:48 ` [PATCH i-g-t 1/3] tests/kms_universal_plane: remove redundant is_intel_device() check Luca Coelho
2026-11-27 15:03 ` Juha-Pekka Heikkilä
2026-11-26 8:48 ` [PATCH i-g-t 2/3] tests/kms_cursor_crc: clean up after a failed subtest Luca Coelho
2026-11-27 15:03 ` Juha-Pekka Heikkilä
2026-11-26 8:48 ` [PATCH i-g-t 3/3] tests/kms_universal_plane: count FBs after the first commit Luca Coelho
2026-11-27 15:04 ` Juha-Pekka Heikkilä [this message]
2026-11-27 1:41 ` ✓ Xe.CI.BAT: success for tests/kms: don't fail cursor-fb-leak because of leftover FBs Patchwork
2026-11-27 1:56 ` ✗ i915.CI.BAT: failure " Patchwork
2026-11-27 14:34 ` ✓ Xe.CI.FULL: success " 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=4dabc04c-efde-4265-85fb-ebc75f2d2bc0@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=luciano.coelho@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