From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2443610E513 for ; Thu, 18 May 2023 11:56:56 +0000 (UTC) Message-ID: Date: Thu, 18 May 2023 17:26:42 +0530 To: Arun R Murthy , References: <20230516062206.1064604-1-arun.r.murthy@intel.com> <20230518112550.1144906-1-arun.r.murthy@intel.com> <20230518112550.1144906-2-arun.r.murthy@intel.com> Content-Language: en-US From: Karthik B S In-Reply-To: <20230518112550.1144906-2-arun.r.murthy@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCHv3 i-g-t 2/4] tests/kms_async_flips: Run the test for all outputs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On 5/18/2023 4:55 PM, Arun R Murthy wrote: > Iterate all outputs, in case we have output specific stuff > (eg. PSR) that could affect the behaviour or async flips > > v2: corrected commit message > v3: run test for all outputs > > Signed-off-by: Ville Syrjälä > Signed-off-by: Arun R Murthy > --- > tests/kms_async_flips.c | 43 ++++++++--------------------------------- > 1 file changed, 8 insertions(+), 35 deletions(-) > > diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c > index fe27a9ec..99653f1e 100644 > --- a/tests/kms_async_flips.c > +++ b/tests/kms_async_flips.c > @@ -58,7 +58,6 @@ typedef struct { > int flip_count; > int frame_count; > bool flip_pending; > - bool extended; > enum pipe pipe; > bool alternate_sync_async; > } data_t; > @@ -548,49 +547,23 @@ static void test_crc(data_t *data) > > static void run_test(data_t *data, void (*test)(data_t *)) > { > - igt_output_t *output; > - enum pipe pipe; > igt_display_t *display = &data->display; > > - for_each_pipe(display, pipe) { > - for_each_valid_output_on_pipe(display, pipe, output) { > - igt_display_reset(display); > - > - igt_output_set_pipe(output, pipe); > - if (!i915_pipe_output_combo_valid(display)) > - continue; > - > - igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) { > - data->output = output; > - data->pipe = pipe; > - test(data); > - } > - > - if (!data->extended) > - break; > - } > - } > -} > + for_each_valid_output_on_pipe(display, data->pipe, data->output) { Hi, Please replace this with 'for_each_pipe_with_valid_output' to iterate over all pipes. Thanks, Karthik.B.S > + igt_display_reset(display); > > -static int opt_handler(int opt, int opt_index, void *_data) > -{ > - data_t *data = _data; > + igt_output_set_pipe(data->output, data->pipe); > + if (!i915_pipe_output_combo_valid(display)) > + continue; > > - switch (opt) { > - case 'e': > - data->extended = true; > - break; > + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(data->pipe), data->output->name) > + test(data); > } > - > - return IGT_OPT_HANDLER_SUCCESS; > } > > -static const char help_str[] = > - " --e \t\tRun the extended tests\n"; > - > static data_t data; > > -igt_main_args("e", NULL, help_str, opt_handler, &data) > +igt_main_args("e", NULL, NULL, NULL, &data) > { > int i; >