[igt-dev] [PATCH i-g-t 1/3] i915/kms_busy: Free spinners after use

Ruhl, Michael J michael.j.ruhl at intel.com
Tue Jun 20 15:09:56 UTC 2023


>-----Original Message-----
>From: Sharma, Swati2 <swati2.sharma at intel.com>
>Sent: Tuesday, June 20, 2023 10:58 AM
>To: igt-dev at lists.freedesktop.org
>Cc: Wilson, Chris P <chris.p.wilson at intel.com>; Ruhl, Michael J
><michael.j.ruhl at intel.com>; Sharma, Swati2 <swati2.sharma at intel.com>
>Subject: [PATCH i-g-t 1/3] i915/kms_busy: Free spinners after use
>
>From: Chris Wilson <chris.p.wilson at intel.com>
>
>Avoid leaking GEM objects between subtests, eventually leading to
>warnings for leaking kernel resources at exit.
>
>Cc: Michael J. Ruhl <michael.j.ruhl at intel.com>
>Signed-off-by: Chris Wilson <chris.p.wilson at intel.com>
>Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
>---
> tests/i915/kms_busy.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/tests/i915/kms_busy.c b/tests/i915/kms_busy.c
>index 3b838cb8..ad96d6b9 100644
>--- a/tests/i915/kms_busy.c
>+++ b/tests/i915/kms_busy.c
>@@ -219,7 +219,7 @@ static void test_atomic_commit_hang(igt_display_t
>*dpy, igt_plane_t *primary,
>
> 	igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev));
>
>-	igt_spin_end(t);
>+	igt_spin_free(dpy->drm_fd, t);
> 	put_ahnd(ahnd);
> }
>
>@@ -304,9 +304,8 @@ test_pageflip_modeset_hang(igt_display_t *dpy,
>
> 	igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev));
>
>-	igt_spin_end(t);
> 	put_ahnd(ahnd);
>-
>+	igt_spin_free(dpy->drm_fd, t);

Why are you moving this one?

Is there a dependency between the ahnd and the spinner (I don't know how this stuff works...).

This does look like a good clean up,

Acked-by: Michael J. Ruhl <michael.j.ruhl at intel.com>

Thanks,

M


> 	igt_remove_fb(dpy->drm_fd, &fb);
> }
>
>--
>2.25.1



More information about the igt-dev mailing list