[igt-dev] [PATCH i-g-t 4/6] tests/kms_async_flips: Run the test only once per pipe

Murthy, Arun R arun.r.murthy at intel.com
Thu Feb 2 11:25:50 UTC 2023


> -----Original Message-----
> From: Ville Syrjala <ville.syrjala at linux.intel.com>
> Sent: Tuesday, January 31, 2023 5:37 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Murthy, Arun R <arun.r.murthy at intel.com>
> Subject: [PATCH i-g-t 4/6] tests/kms_async_flips: Run the test only once per
> pipe
> 
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> No real reason to iterate over all the outputs here. Just do the test once per
> pipe.
> 
> Cc: Arun R Murthy <arun.r.murthy at intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---

Reviewed-by: Arun R Murthy <arun.r.murthy at intel.com>

Thanks and Regards,
Arun R Murthy
---------------------

>  tests/kms_async_flips.c | 18 +++++-------------
>  1 file changed, 5 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c index
> f8c97e029c59..54611f66350d 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -544,20 +544,12 @@ 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;
> +	for_each_pipe_with_valid_output(&data->display, data->pipe, data-
> >output) {
> +		igt_dynamic_f("pipe-%s", kmstest_pipe_name(data->pipe))
> +			test(data);
> 
> -	for_each_pipe(&data->display, pipe) {
> -		for_each_valid_output_on_pipe(&data->display, pipe,
> output) {
> -			igt_dynamic_f("pipe-%s-%s",
> kmstest_pipe_name(pipe), output->name) {
> -				data->output = output;
> -				data->pipe = pipe;
> -				test(data);
> -			}
> -
> -			if (!data->extended)
> -				break;
> -		}
> +		if (!data->extended)
> +			break;
>  	}
>  }
> 
> --
> 2.39.1



More information about the igt-dev mailing list