From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id C940E10E61B for ; Tue, 6 Sep 2022 09:53:09 +0000 (UTC) From: Bhanuprakash Modem To: igt-dev@lists.freedesktop.org Date: Tue, 6 Sep 2022 15:19:50 +0530 Message-Id: <20220906095030.486152-13-bhanuprakash.modem@intel.com> In-Reply-To: <20220906095030.486152-1-bhanuprakash.modem@intel.com> References: <20220906095030.486152-1-bhanuprakash.modem@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [i-g-t V2 12/52] tests/kms_cursor_crc: Add support for Bigjoiner List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: This patch will add a check to Skip the subtest if a selected pipe/output combo won't support Bigjoiner or 8K mode. Example: * Pipe-D wont support a mode > 5K * To use 8K mode on a pipe then consecutive pipe must be available & free. Signed-off-by: Bhanuprakash Modem --- tests/kms_cursor_crc.c | 47 +++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index 53f18f4f..8338a372 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -687,6 +687,21 @@ static void test_rapid_movement(data_t *data) igt_assert_lt(usec, 0.9 * 400 * 1000000 / data->refresh); } +static bool is_valid_combo(data_t *data, enum pipe pipe) +{ + bool ret = true; + igt_display_t *display = &data->display; + + igt_display_reset(display); + + igt_output_set_pipe(data->output, pipe); + if (!igt_test_constraint(display)) + ret = false; + igt_output_set_pipe(data->output, PIPE_NONE); + + return ret; +} + static void run_size_tests(data_t *data, void (*testfunc)(data_t *), int w, int h) { @@ -708,15 +723,18 @@ static void run_size_tests(data_t *data, void (*testfunc)(data_t *), } create_cursor_fb(data, w, h); - if (require_cursor_size(data, w, h)) { - igt_info("Cursor size %dx%d not supported by driver\n", w, h); - - igt_remove_fb(data->drm_fd, &data->fb); - return; - } - for_each_pipe(&data->display, pipe) { data->pipe = pipe; + + if (!is_valid_combo(data, pipe)) + continue; + + if (require_cursor_size(data, w, h)) { + igt_info("Cursor size %dx%d not supported by driver\n", w, h); + + continue; + } + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(data->output)) run_test(data, testfunc, w, h); @@ -761,6 +779,9 @@ static void run_tests_on_pipe(data_t *data) for_each_pipe(&data->display, pipe) { data->pipe = pipe; + if (!is_valid_combo(data, pipe)) + continue; + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), data->output->name) @@ -775,6 +796,9 @@ static void run_tests_on_pipe(data_t *data) for_each_pipe(&data->display, pipe) { data->pipe = pipe; + if (!is_valid_combo(data, pipe)) + continue; + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), data->output->name) @@ -789,6 +813,9 @@ static void run_tests_on_pipe(data_t *data) for_each_pipe(&data->display, pipe) { data->pipe = pipe; + if (!is_valid_combo(data, pipe)) + continue; + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), data->output->name) @@ -807,6 +834,9 @@ static void run_tests_on_pipe(data_t *data) data->pipe = pipe; data->flags = TEST_DPMS; + if (!is_valid_combo(data, pipe)) + continue; + if (require_cursor_size(data, data->cursor_max_w, data->cursor_max_h)) { igt_debug("Cursor size %dx%d not supported by driver\n", data->cursor_max_w, data->cursor_max_h); @@ -828,6 +858,9 @@ static void run_tests_on_pipe(data_t *data) data->pipe = pipe; data->flags = TEST_SUSPEND; + if (!is_valid_combo(data, pipe)) + continue; + if (require_cursor_size(data, data->cursor_max_w, data->cursor_max_h)) { igt_debug("Cursor size %dx%d not supported by driver\n", data->cursor_max_w, data->cursor_max_h); -- 2.35.1