[igt-dev] [PATCH i-g-t 1/1] tests/kms_plane_scaling: Don't run plane scaler tests on each output

Petri Latvala petri.latvala at intel.com
Tue Nov 10 09:13:24 UTC 2020


On Fri, Nov 06, 2020 at 03:52:22PM +0530, Mohammed Khajapasha wrote:
> Don't run plane scaler tests on each output of a pipe.
> We probably don't need to test plane scaler tests on each
> output of a pipe.
> 
> $ time ./build/tests/kms_plane_scaling
> - real    17m6.593s
> + real    6m33.515s
> 
> Cc: petri.latvala at intel.com
> Cc: mika.kahola at intel.com
> Cc: juha-pekka.heikkila at intel.com
> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha at intel.com>
> ---
>  tests/kms_plane_scaling.c | 38 +++++++++++++++++++++++---------------
>  1 file changed, 23 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index ecd2c2e30..e14e6eaee 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -238,6 +238,8 @@ static void test_scaler_with_rotation_pipe(data_t *d, enum pipe pipe,
>  	uint64_t tiling = is_i915_device(d->drm_fd) ?
>  		LOCAL_I915_FORMAT_MOD_Y_TILED : LOCAL_DRM_FORMAT_MOD_NONE;
>  
> +	igt_require(get_num_scalers(d, pipe) > 0);
> +
>  	igt_output_set_pipe(output, pipe);
>  	for_each_plane_on_pipe(display, pipe, plane) {
>  		if (plane->type == DRM_PLANE_TYPE_CURSOR)
> @@ -278,6 +280,8 @@ static void test_scaler_with_pixel_format_pipe(data_t *d, enum pipe pipe, igt_ou
>  	igt_display_t *display = &d->display;
>  	igt_plane_t *plane;
>  
> +	igt_require(get_num_scalers(d, pipe) > 0);
> +
>  	igt_output_set_pipe(output, pipe);
>  
>  	for_each_plane_on_pipe(display, pipe, plane) {
> @@ -351,6 +355,8 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
>  	uint64_t tiling = is_i915_device(display->drm_fd) ?
>  		LOCAL_I915_FORMAT_MOD_X_TILED : LOCAL_DRM_FORMAT_MOD_NONE;
>  
> +	igt_require(get_num_scalers(d, pipe) > 0);
> +
>  	igt_skip_on(!igt_display_has_format_mod(display, DRM_FORMAT_XRGB8888,
>  						tiling));
>  
> @@ -685,30 +691,32 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>  		igt_require(data.display.is_atomic);
>  	}
>  
> -	for_each_pipe_static(pipe) igt_subtest_group {
> +	igt_subtest_group {
>  		igt_output_t *output;
>  
> -		igt_fixture {
> -			igt_display_require_output_on_pipe(&data.display, pipe);
> -
> -			igt_require(get_num_scalers(&data, pipe) > 0);
> -		}
> -
> -		igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))
> -			for_each_valid_output_on_pipe(&data.display, pipe, output)
> +		igt_subtest_with_dynamic("plane-scaling") {
> +			for_each_pipe_with_single_output(&data.display, pipe, output)
> +				igt_dynamic_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))
>  				test_plane_scaling_on_pipe(&data, pipe, output);

Please check the indentation after igt_dynamic_f here and below, the
function call should be indented to make it clear it, and only it, is
part of the igt_dynamic block.

Otherwise LGTM, so with that changed
Reviewed-by: Petri Latvala <petri.latvala at intel.com>


> +		}
>  
> -		igt_subtest_f("pipe-%s-scaler-with-pixel-format", kmstest_pipe_name(pipe))
> -			for_each_valid_output_on_pipe(&data.display, pipe, output)
> +		igt_subtest_with_dynamic("scaler-with-pixel-format") {
> +			for_each_pipe_with_single_output(&data.display, pipe, output)
> +				igt_dynamic_f("pipe-%s-scaler-with-pixel-format", kmstest_pipe_name(pipe))
>  				test_scaler_with_pixel_format_pipe(&data, pipe, output);
> +		}
>  
> -		igt_subtest_f("pipe-%s-scaler-with-rotation", kmstest_pipe_name(pipe))
> -			for_each_valid_output_on_pipe(&data.display, pipe, output)
> +		igt_subtest_with_dynamic("scaler-with-rotation") {
> +			for_each_pipe_with_single_output(&data.display, pipe, output)
> +				igt_dynamic_f("pipe-%s-scaler-with-rotation", kmstest_pipe_name(pipe))
>  				test_scaler_with_rotation_pipe(&data, pipe, output);
> +		}
>  
> -		igt_subtest_f("pipe-%s-scaler-with-clipping-clamping", kmstest_pipe_name(pipe))
> -			for_each_valid_output_on_pipe(&data.display, pipe, output)
> +		igt_subtest_with_dynamic("scaler-with-clipping-clamping") {
> +			for_each_pipe_with_single_output(&data.display, pipe, output)
> +				igt_dynamic_f("pipe-%s-scaler-with-rotation", kmstest_pipe_name(pipe))
>  				test_scaler_with_clipping_clamping_scenario(&data, pipe, output);
> +		}
>  	}
>  
>  	igt_subtest_f("2x-scaler-multi-pipe")
> -- 
> 2.29.2.154.g7f7ebe054a
> 


More information about the igt-dev mailing list