Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F22910E609 for ; Wed, 20 Apr 2022 12:07:24 +0000 (UTC) From: Mohammed Thasleem To: igt-dev@lists.freedesktop.org Date: Tue, 12 Oct 2021 16:23:00 +0530 Message-Id: <20211012105300.27890-2-mohammed.thasleem@intel.com> In-Reply-To: <20211012105300.27890-1-mohammed.thasleem@intel.com> References: <20211012105300.27890-1-mohammed.thasleem@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t 2/2] [i-g-t] tests/kms: IGT cleanup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Before starting the subtest, clean up the states to default by igt_display_reset(). Replace newly defined function in particular test with existing library function. Signed-off-by: Mohammed Thasleem --- tests/kms_lease.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/kms_lease.c b/tests/kms_lease.c index 0bf102a6..6e8f06d5 100644 --- a/tests/kms_lease.c +++ b/tests/kms_lease.c @@ -100,6 +100,8 @@ static int prepare_crtc(lease_t *lease, uint32_t connector_id, uint32_t crtc_id) if (!output) return -ENOENT; + igt_display_reset(display); + /* select the pipe we want to use */ igt_output_set_pipe(output, pipe); @@ -136,8 +138,8 @@ static void cleanup_crtc(lease_t *lease, igt_output_t *output) primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); igt_plane_set_fb(primary, NULL); - igt_output_set_pipe(output, PIPE_ANY); - igt_display_commit(display); + igt_output_set_pipe(output, PIPE_NONE); + igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); } static int create_lease(int fd, struct drm_mode_create_lease *mcl) -- 2.25.1