[igt-dev] [PATCH i-g-t 2/5] tests/i915/gem_render_copy: Don't leak bos between subtests
Chris Wilson
chris at chris-wilson.co.uk
Wed Apr 17 20:41:30 UTC 2019
Quoting Ville Syrjala (2019-04-17 21:35:41)
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Unref the bos after one subtest is done. The next subtest
> will allocate its own bos.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> tests/i915/gem_render_copy.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/i915/gem_render_copy.c b/tests/i915/gem_render_copy.c
> index 8d62a0f43ad8..a6476a4d2d8d 100644
> --- a/tests/i915/gem_render_copy.c
> +++ b/tests/i915/gem_render_copy.c
> @@ -662,6 +662,13 @@ static void test(data_t *data, uint32_t tiling, uint64_t ccs_modifier)
>
> if (ccs_modifier)
> scratch_buf_aux_check(data, &ccs);
> +
> + for (int i = 0; i < num_src; i++)
> + drm_intel_bo_unreference(src[i].buf.bo);
> + drm_intel_bo_unreference(dst.bo);
> + if (ccs_modifier)
> + drm_intel_bo_unreference(ccs.bo);
> + drm_intel_bo_unreference(ref.bo);
True. Plaintive whisper for scratch_buf_fini(), and perhaps reverse the
ordering for onions.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the igt-dev
mailing list