Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id D2B8B10E5B7 for ; Wed, 20 Apr 2022 12:07:20 +0000 (UTC) From: Mohammed Thasleem To: igt-dev@lists.freedesktop.org Date: Tue, 12 Oct 2021 16:22:59 +0530 Message-Id: <20211012105300.27890-1-mohammed.thasleem@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t 1/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/i915/kms_mmap_write_crc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c index b17e5fdb..f8825284 100644 --- a/tests/i915/kms_mmap_write_crc.c +++ b/tests/i915/kms_mmap_write_crc.c @@ -169,6 +169,8 @@ static void prepare_crtc(data_t *data) igt_output_t *output = data->output; drmModeModeInfo *mode; + igt_display_reset(&data->display); + /* select the pipe we want to use */ igt_output_set_pipe(output, data->pipe); @@ -204,8 +206,8 @@ static void cleanup_crtc(data_t *data) igt_plane_set_fb(data->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); igt_remove_fb(data->drm_fd, &data->fb[0]); igt_remove_fb(data->drm_fd, &data->fb[1]); -- 2.25.1