From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id B58FB10E16D for ; Mon, 2 Jan 2023 10:49:13 +0000 (UTC) From: Andrzej Hajda To: igt-dev@lists.freedesktop.org Date: Mon, 2 Jan 2023 11:49:01 +0100 Message-Id: <20230102104901.214146-1-andrzej.hajda@intel.com> In-Reply-To: <7d276e53-0798-dc64-32be-a20bb4fb84a3@linux.intel.com> References: <7d276e53-0798-dc64-32be-a20bb4fb84a3@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: cleanup framebuffers after test List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthew Auld , Nirmoy Das Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Framebuffers created by igt_create_*_fb should be removed with igt_remove_fb after test finish. Since all this happens inside data_t context there is cleanup_fbs helper for it. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7331 Signed-off-by: Andrzej Hajda --- tests/kms_plane_scaling.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c index 4c621cce842..887a55e63ff 100644 --- a/tests/kms_plane_scaling.c +++ b/tests/kms_plane_scaling.c @@ -366,6 +366,7 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane, igt_plane_set_fb(plane, NULL); igt_plane_set_position(plane, 0, 0); + cleanup_fbs(d); igt_skip_on_f(commit_ret == -ERANGE || commit_ret == -EINVAL, "Unsupported scaling factor with fb size %dx%d\n", @@ -670,8 +671,7 @@ test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2, test_type); } - igt_remove_fb(display->drm_fd, &d->fb[1]); - igt_remove_fb(display->drm_fd, &d->fb[2]); + cleanup_fbs(d); } static void @@ -735,9 +735,7 @@ test_invalid_num_scalers(data_t *d, enum pipe pipe, igt_output_t *output) igt_plane_set_fb(plane[0], NULL); igt_plane_set_fb(plane[1], NULL); igt_plane_set_fb(plane[2], NULL); - igt_remove_fb(display->drm_fd, &d->fb[0]); - igt_remove_fb(display->drm_fd, &d->fb[1]); - igt_remove_fb(display->drm_fd, &d->fb[2]); + cleanup_fbs(d); } static void test_scaler_with_multi_pipe_plane(data_t *d) @@ -813,6 +811,7 @@ static void test_scaler_with_multi_pipe_plane(data_t *d) igt_plane_set_fb(plane[1], NULL); igt_plane_set_fb(plane[2], NULL); igt_plane_set_fb(plane[3], NULL); + cleanup_fbs(d); igt_skip_on_f(ret1 == -ERANGE || ret1 == -EINVAL || ret2 == -ERANGE || ret1 == -EINVAL, -- 2.34.1