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

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Jun 21 07:08:59 UTC 2023


Hi Swati,

On 2023-06-20 at 20:27:35 +0530, Swati Sharma wrote:
> 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);

Why not do it like in previous change? imho here:
	igt_spin_free(dpy->drm_fd, t);

Regards,
Kamil

>  	put_ahnd(ahnd);
> -
> +	igt_spin_free(dpy->drm_fd, t);
>  	igt_remove_fb(dpy->drm_fd, &fb);
>  }
>  
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list