Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id C6ADA6EA0C for ; Wed, 13 Oct 2021 07:50:59 +0000 (UTC) From: Bhanuprakash Modem Date: Wed, 13 Oct 2021 13:20:17 +0530 Message-Id: <20211013075017.233701-1-bhanuprakash.modem@intel.com> In-Reply-To: <20210916142301.17796-1-vidya.srinivas@intel.com> References: <20210916142301.17796-1-vidya.srinivas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [i-g-t v3] tests/kms_plane_multiple: Fix regression test_plane_position_with_output List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: igt-dev@lists.freedesktop.org Cc: Vidya Srinivas , Karthik B S , Bhanuprakash Modem List-ID: From: Vidya Srinivas Starting commit 4d4a76729b328b65122 "Start continuous CRC capture after commit" few variants of Intel TGL and JSL devices are failing with CRC mismatch due to time sensitivity. Patch switches to older way of obtaining CRC, but keeps in-tact continuous CRC collection within the iteration and includes checking of i915 to not cause regression on non-intel devices. v2: Fixed review comments from Karthik. v3: Rebase (Conflicts resolved) Signed-off-by: Vidya Srinivas Reviewed-by: Karthik B S Signed-off-by: Bhanuprakash Modem --- tests/kms_plane_multiple.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c index d94ea23c25..ece00097e8 100644 --- a/tests/kms_plane_multiple.c +++ b/tests/kms_plane_multiple.c @@ -79,8 +79,6 @@ static void test_init(data_t *data, enum pipe pipe, int n_planes) static void test_fini(data_t *data, igt_output_t *output, int n_planes) { - igt_pipe_crc_stop(data->pipe_crc); - /* reset the constraint on the pipe */ igt_output_set_pipe(output, PIPE_ANY); @@ -291,7 +289,6 @@ test_plane_position_with_output(data_t *data, enum pipe pipe, igt_plane_t *plane; int i; int err, c = 0; - int crc_enabled = 0; int iterations = opt.iterations < 1 ? 1 : opt.iterations; bool loop_forever; char info[256]; @@ -333,16 +330,20 @@ test_plane_position_with_output(data_t *data, enum pipe pipe, i = 0; while (i < iterations || loop_forever) { + /* Intel devices need it here, timing sensitive on few devices */ + if (is_i915_device(data->drm_fd)) + igt_pipe_crc_start(data->pipe_crc); + /* randomize planes and set up the holes */ prepare_planes(data, pipe, &blue, modifier, c, output); igt_display_commit2(&data->display, COMMIT_ATOMIC); - if (!crc_enabled) { + if (!is_i915_device(data->drm_fd)) igt_pipe_crc_start(data->pipe_crc); - crc_enabled = 1; - } igt_pipe_crc_get_current(data->display.drm_fd, data->pipe_crc, &crc); + igt_assert_crc_equal(&data->ref_crc, &crc); + igt_pipe_crc_stop(data->pipe_crc); for_each_plane_on_pipe(&data->display, pipe, plane) igt_plane_set_fb(plane, NULL); @@ -352,8 +353,6 @@ test_plane_position_with_output(data_t *data, enum pipe pipe, for (int x = 0; x < c; x++) igt_remove_fb(data->drm_fd, &data->fb[x]); - igt_assert_crc_equal(&data->ref_crc, &crc); - i++; } -- 2.32.0