[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 16:35:57 UTC 2023


Hi Swati,

On 2023-06-21 at 14:30:30 +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.
> 
> v2: -placed igt_spin_free() before the put_ahnd()
> 
> Acked-by: 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..e953b814 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);
> +	igt_spin_free(dpy->drm_fd, t);
>  	put_ahnd(ahnd);
> -
- ^
We should avoid style changes when making fixes, but imho
here it is minor issue, so

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

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


More information about the igt-dev mailing list