Return-Path: Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23B7010F2DF for ; Tue, 28 Jun 2022 13:39:11 +0000 (UTC) From: Mohammed Thasleem To: igt-dev@lists.freedesktop.org Date: Tue, 28 Jun 2022 19:05:54 +0530 Message-Id: <20220628133554.37768-3-mohammed.thasleem@intel.com> In-Reply-To: <20220628133554.37768-1-mohammed.thasleem@intel.com> References: <20220628133554.37768-1-mohammed.thasleem@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH v3 2/2] tests/i915/kms_mmap_write_crc: Test Cleanup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nidhi1.gupta@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Sanitize the system state before starting the subtest. Signed-off-by: Mohammed Thasleem --- tests/i915/kms_mmap_write_crc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c index 50aa434d..3309f359 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(display); + /* select the pipe we want to use */ igt_output_set_pipe(output, data->pipe); @@ -204,7 +206,7 @@ static void cleanup_crtc(data_t *data) igt_plane_set_fb(data->primary, NULL); - igt_output_set_pipe(output, PIPE_ANY); + igt_output_set_pipe(output, PIPE_NONE); igt_display_commit(display); igt_remove_fb(data->drm_fd, &data->fb[0]); @@ -292,6 +294,7 @@ igt_main_args("n", NULL, NULL, opt_handler, NULL) igt_fixture { igt_display_fini(&data.display); + close(data.drm_fd); igt_stop_helper(&hog); } -- 2.25.1