[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
Thu Nov 12 11:55:47 UTC 2020
On Thu, Nov 12, 2020 at 11:31:24AM +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>
> Reviewed-by: Petri Latvala <petri.latvala at intel.com>
> ---
Merged, thanks.
--
Petri Latvala
> tests/kms_plane_scaling.c | 44 +++++++++++++++++++++++----------------
> 1 file changed, 26 insertions(+), 18 deletions(-)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index ecd2c2e30..39acad6cd 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_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);
> }
>
> - igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))
> - for_each_valid_output_on_pipe(&data.display, pipe, output)
> - test_plane_scaling_on_pipe(&data, pipe, output);
> -
> - igt_subtest_f("pipe-%s-scaler-with-pixel-format", kmstest_pipe_name(pipe))
> - for_each_valid_output_on_pipe(&data.display, pipe, output)
> - test_scaler_with_pixel_format_pipe(&data, 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)
> - test_scaler_with_rotation_pipe(&data, 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)
> - test_scaler_with_clipping_clamping_scenario(&data, 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