[PATCH i-g-t 2/5] tests/kms: Drop redundant check for pipe/output combo validity

B, Jeevan jeevan.b at intel.com
Wed Jun 12 12:11:30 UTC 2024


LGTM

Reviewed-by: Jeevan B <jeevan.b at intel.com>

> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of
> Bhanuprakash Modem
> Sent: Monday, April 8, 2024 11:42 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
> Subject: [PATCH i-g-t 2/5] tests/kms: Drop redundant check for pipe/output
> combo validity
> 
> As intel_pipe_output_combo_valid() is taking care of pipe/output combo
> validity, drop other redundant checks.
> 
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
>  tests/kms_content_protection.c |  3 ---
>  tests/kms_properties.c         |  3 ---
>  tests/kms_vrr.c                | 22 ++++++++++------------
>  3 files changed, 10 insertions(+), 18 deletions(-)
> 
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 6858b22e2..e9a468eb0 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -564,9 +564,6 @@ test_content_protection(enum igt_commit_style s,
> int content_type)
> 
>  	for_each_connected_output(display, output) {
>  		for_each_pipe(display, pipe) {
> -			if (!igt_pipe_connector_valid(pipe, output))
> -				continue;
> -
>  			igt_display_reset(display);
> 
>  			igt_output_set_pipe(output, pipe);
> diff --git a/tests/kms_properties.c b/tests/kms_properties.c index
> bd414f534..6f92b218e 100644
> --- a/tests/kms_properties.c
> +++ b/tests/kms_properties.c
> @@ -337,9 +337,6 @@ static void connector_properties(igt_display_t
> *display, bool atomic)
>  		bool found = false;
> 
>  		for_each_pipe(display, pipe) {
> -			if (!igt_pipe_connector_valid(pipe, output))
> -				continue;
> -
>  			igt_display_reset(display);
> 
>  			igt_output_set_pipe(output, pipe);
> diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c index 15c62b34b..2a160b990
> 100644
> --- a/tests/kms_vrr.c
> +++ b/tests/kms_vrr.c
> @@ -733,22 +733,20 @@ run_vrr_test(data_t *data, test_t test, uint32_t
> flags)
>  			continue;
> 
>  		for_each_pipe(&data->display, pipe) {
> -			if (igt_pipe_connector_valid(pipe, output)) {
> -				igt_output_set_pipe(output, pipe);
> +			igt_output_set_pipe(output, pipe);
> 
> -				if (!intel_pipe_output_combo_valid(&data-
> >display)) {
> -					igt_output_set_pipe(output,
> PIPE_NONE);
> -					continue;
> -				}
> +			if (!intel_pipe_output_combo_valid(&data->display))
> {
> +				igt_output_set_pipe(output, PIPE_NONE);
> +				continue;
> +			}
> 
> -				igt_dynamic_f("pipe-%s-%s",
> -					      kmstest_pipe_name(pipe), output-
> >name)
> -					test(data, pipe, output, flags);
> +			igt_dynamic_f("pipe-%s-%s",
> +				      kmstest_pipe_name(pipe), output->name)
> +				test(data, pipe, output, flags);
> 
> -				test_cleanup(data, pipe, output);
> +			test_cleanup(data, pipe, output);
> 
> -				break;
> -			}
> +			break;
>  		}
>  	}
>  }
> --
> 2.43.2



More information about the igt-dev mailing list