public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Martin Peres <martin.peres@free.fr>
Subject: Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_plane: Use just one valid output
Date: Thu, 14 Mar 2019 13:19:55 +0100	[thread overview]
Message-ID: <ae5e623f-c31a-fea2-9db9-a3213a031ce5@linux.intel.com> (raw)
In-Reply-To: <20190314110305.28903-2-arkadiusz.hiler@intel.com>

Op 14-03-2019 om 12:03 schreef Arkadiusz Hiler:
> Since those are just pipe CRC tests output does not really matter.
>
> Instead of running the test number-of-connected-outputs times per pipe,
> let's run them just once.
>
> Cc: Martin Peres <martin.peres@free.fr>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>  tests/kms_plane.c | 78 +++++++++++++++++++----------------------------
>  1 file changed, 32 insertions(+), 46 deletions(-)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 4c0199fa..d037098f 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -219,28 +219,23 @@ test_plane_position_with_output(data_t *data,
>  static void
>  test_plane_position(data_t *data, enum pipe pipe, unsigned int flags)
>  {
> +	int n_planes = data->display.pipes[pipe].n_planes;
>  	igt_output_t *output;
> -	int connected_outs = 0;
> +	igt_crc_t reference_crc;
>  
> -	for_each_valid_output_on_pipe(&data->display, pipe, output) {
> -		int n_planes = data->display.pipes[pipe].n_planes;
> -		igt_crc_t reference_crc;
> +	output = igt_get_single_output_for_pipe(&data->display, pipe);
> +	igt_require(output);
>  
> -		test_init(data, pipe);
> +	test_init(data, pipe);
>  
> -		test_grab_crc(data, output, pipe, &green, &reference_crc);
> +	test_grab_crc(data, output, pipe, &green, &reference_crc);
>  
> -		for (int plane = 1; plane < n_planes; plane++)
> -			test_plane_position_with_output(data, pipe, plane,
> -							output, &reference_crc,
> -							flags);
> +	for (int plane = 1; plane < n_planes; plane++)
> +		test_plane_position_with_output(data, pipe, plane,
> +						output, &reference_crc,
> +						flags);
>  
> -		test_fini(data);
> -
> -		connected_outs++;
> -	}
> -
> -	igt_skip_on(connected_outs == 0);
> +	test_fini(data);
>  }
>  
>  /*
> @@ -340,31 +335,24 @@ test_plane_panning_with_output(data_t *data,
>  static void
>  test_plane_panning(data_t *data, enum pipe pipe, unsigned int flags)
>  {
> +	int n_planes = data->display.pipes[pipe].n_planes;
>  	igt_output_t *output;
> -	int connected_outs = 0;
> +	igt_crc_t red_crc;
> +	igt_crc_t blue_crc;
>  
> -	for_each_valid_output_on_pipe(&data->display, pipe, output) {
> -		int n_planes = data->display.pipes[pipe].n_planes;
> -		igt_crc_t red_crc;
> -		igt_crc_t blue_crc;
> +	output = igt_get_single_output_for_pipe(&data->display, pipe);
> +	igt_require(output);
>  
> -		test_init(data, pipe);
> +	test_init(data, pipe);
>  
> -		test_grab_crc(data, output, pipe, &red, &red_crc);
> -		test_grab_crc(data, output, pipe, &blue, &blue_crc);
> +	test_grab_crc(data, output, pipe, &red, &red_crc);
> +	test_grab_crc(data, output, pipe, &blue, &blue_crc);
>  
> -		for (int plane = 1; plane < n_planes; plane++)
> -			test_plane_panning_with_output(data, pipe, plane,
> -						       output,
> -						       &red_crc, &blue_crc,
> -						       flags);
> +	for (int plane = 1; plane < n_planes; plane++)
> +		test_plane_panning_with_output(data, pipe, plane, output,
> +					       &red_crc, &blue_crc, flags);
>  
> -		test_fini(data);
> -
> -		connected_outs++;
> -	}
> -
> -	igt_skip_on(connected_outs == 0);
> +	test_fini(data);
>  }
>  
>  static const color_t colors[] = {
> @@ -599,22 +587,20 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
>  static void
>  test_pixel_formats(data_t *data, enum pipe pipe)
>  {
> +	bool result;
>  	igt_output_t *output;
> +	igt_plane_t *plane;
>  
> -	igt_display_require_output_on_pipe(&data->display, pipe);
> +	output = igt_get_single_output_for_pipe(&data->display, pipe);
> +	igt_require(output);
>  
> -	for_each_valid_output_on_pipe(&data->display, pipe, output) {
> -		bool result = true;
> -		igt_plane_t *plane;
> +	result = true;
> +	for_each_plane_on_pipe(&data->display, pipe, plane)
> +		result &= test_format_plane(data, pipe, output, plane);
>  
> -		for_each_plane_on_pipe(&data->display, pipe, plane)
> -			result &= test_format_plane(data, pipe, output, plane);
> +	igt_assert_f(result, "At least one CRC mismatch happened\n");
>  
> -		igt_assert_f(result, "At least one CRC mismatch happened\n");
> -
> -
> -		igt_output_set_pipe(output, PIPE_ANY);
> -	}
> +	igt_output_set_pipe(output, PIPE_ANY);
>  }
>  
>  static void


_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-03-14 12:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14 11:03 [igt-dev] [PATCH i-g-t 1/2] tests/kms_plane: Print count of mismatched colors Arkadiusz Hiler
2019-03-14 11:03 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_plane: Use just one valid output Arkadiusz Hiler
2019-03-14 12:19   ` Maarten Lankhorst [this message]
2019-03-14 12:54 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_plane: Print count of mismatched colors Patchwork
2019-03-14 13:07 ` [igt-dev] [PATCH i-g-t 1/2] " Martin Peres
2019-03-14 19:41 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
2019-03-14 22:35 ` [igt-dev] [PATCH i-g-t 1/2] " Dhinakaran Pandiyan
2019-03-15 11:56   ` Martin Peres
2019-03-15 19:41     ` Dhinakaran Pandiyan
2019-03-18 10:48       ` Petri Latvala
  -- strict thread matches above, loose matches on Subject: below --
2019-03-15 12:53 Petri Latvala
2019-03-15 12:53 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_plane: Use just one valid output Petri Latvala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae5e623f-c31a-fea2-9db9-a3213a031ce5@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=martin.peres@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox