[igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: restrict execution based on number of outputs connected

Karthik B S karthik.b.s at intel.com
Tue Feb 9 04:22:18 UTC 2021


On 2/8/2021 5:39 PM, Jeevan B wrote:
> In multi display scenario test used to exit after running on two pipes and
> it would skip other displays connected. so added a variable to correct this
> behavior.

With multidisplay set ups, the test ran only the first pipe on 2 outputs 
rather than two pipes?

With this fix in commit message, the patch looks good to me.

Reviewed-by: Karthik B S <karthik.b.s at intel.com>

>
> Signed-off-by: Jeevan B <jeevan.b at intel.com>
> ---
>   tests/kms_rotation_crc.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index 6d4e87ed..eb66260b 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -424,13 +424,16 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>   	drmModeModeInfo *mode;
>   	igt_output_t *output;
>   	enum pipe pipe;
> -	int pipe_count = 0;
> +	int pipe_count = 0, connected_outputs = 0;
>   
>   	if (plane_type == DRM_PLANE_TYPE_CURSOR)
>   		igt_require(display->has_cursor_plane);
>   
>   	igt_display_require_output(display);
>   
> +	for_each_connected_output(&data->display, output)
> +		connected_outputs++;
> +
>   	for_each_pipe_with_valid_output(display, pipe, output) {
>   		igt_plane_t *plane;
>   		int i, j, c;
> @@ -467,7 +470,7 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>   			continue;
>   
>   		/* restricting the execution to 2 pipes to reduce execution time*/
> -		if (pipe_count == 2 && !data->extended)
> +		if (pipe_count == 2 * connected_outputs && !data->extended)
>   			break;
>   		pipe_count++;
>   




More information about the igt-dev mailing list