From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Swati Sharma <swati2.sharma@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [v3 3/9] tests/kms_plane_scaling: Upscaling each plane
Date: Wed, 9 Feb 2022 10:26:57 +0200 [thread overview]
Message-ID: <YgN60QgnQeCnbnh5@intel.com> (raw)
In-Reply-To: <20220208055039.31306-4-swati2.sharma@intel.com>
On Tue, Feb 08, 2022 at 11:20:33AM +0530, Swati Sharma wrote:
> Subtest for testing upscaling for each plane
> individually (checked 1 plane per "class" like
> we do in other tests)
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/kms_plane_scaling.c | 65 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 65 insertions(+)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 1cf62841..25e91659 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -230,6 +230,64 @@ static bool test_format(data_t *data,
> return true;
> }
>
> +static void
> +__test_plane_upscaling(data_t *d, igt_plane_t *plane,
> + enum pipe pipe, igt_output_t *output)
> +{
> + igt_display_t *display = &d->display;
> + int width, height;
> + drmModeModeInfo *mode;
> +
> + cleanup_crtc(d);
> +
> + igt_output_set_pipe(output, pipe);
> + mode = igt_output_get_mode(output);
> + width = height = 20;
> +
> + igt_create_color_pattern_fb(display->drm_fd,
> + width, height,
> + DRM_FORMAT_XRGB8888,
> + I915_TILING_NONE,
> + 1.0, 0.0, 0.0, &d->fb[0]);
> +
> + igt_plane_set_fb(plane, &d->fb[0]);
> + igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
> + igt_display_commit2(display, COMMIT_ATOMIC);
> +
> + igt_plane_set_fb(plane, NULL);
> + igt_remove_fb(display->drm_fd, &d->fb[0]);
> +}
> +
> +static void
> +test_plane_upscaling(data_t *d, enum pipe pipe, igt_output_t *output)
> +{
> + igt_display_t *display = &d->display;
> + igt_plane_t *plane;
> + uint64_t modifier = is_i915_device(d->drm_fd) ?
> + I915_FORMAT_MOD_Y_TILED : DRM_FORMAT_MOD_LINEAR;
Why should we use Y-tiling? That's just going to artifically restrict
what platforms can run this test.
> +
> + igt_require(get_num_scalers(d, pipe) > 0);
> +
> + for_each_plane_on_pipe(display, pipe, plane) {
> + struct igt_vec tested_formats;
> +
> + if (plane->type == DRM_PLANE_TYPE_CURSOR)
> + continue;
> +
> + igt_vec_init(&tested_formats, sizeof(uint32_t));
> +
> + for (int j = 0; j < plane->drm_plane->count_formats; j++) {
> + uint32_t format = plane->drm_plane->formats[j];
> + if (test_format(d, &tested_formats, format) &&
> + igt_plane_has_format_mod(plane, format, modifier) &&
> + can_scale(d, format))
> + __test_plane_upscaling(d, plane, pipe, output);
> + }
> +
> + igt_vec_fini(&tested_formats);
> + }
> +}
> +
> static bool test_pipe_iteration(data_t *data, enum pipe pipe, int iteration)
> {
> if (!is_i915_device(data->drm_fd) ||
> @@ -547,6 +605,13 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
> igt_subtest_group {
> igt_output_t *output;
>
> + igt_describe("Tests plane upscaling.");
> + igt_subtest_with_dynamic("plane-upscaling") {
> + for_each_pipe_with_single_output(&data.display, pipe, output)
> + igt_dynamic_f("pipe-%s-%s-upscaling", kmstest_pipe_name(pipe), igt_output_name(output))
> + test_plane_upscaling(&data, pipe, output);
> + }
> +
> igt_describe("Tests scaling with pixel formats.");
> igt_subtest_with_dynamic("scaler-with-pixel-format") {
> for_each_pipe_with_single_output(&data.display, pipe, output)
> --
> 2.25.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-02-09 8:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 5:50 [igt-dev] [v3 0/9] Addition of new plane scaling test cases Swati Sharma
2022-02-08 5:50 ` [igt-dev] [v3 1/9] tests/kms_plane_scaling: Removal of plane-scaling subtest Swati Sharma
2022-02-08 5:50 ` [igt-dev] [v3 2/9] tests/kms_plane_scaling: Add output name in dynamic subtests Swati Sharma
2022-02-08 5:50 ` [igt-dev] [v3 3/9] tests/kms_plane_scaling: Upscaling each plane Swati Sharma
2022-02-09 8:26 ` Ville Syrjälä [this message]
2022-02-09 8:28 ` Sharma, Swati2
2022-02-08 5:50 ` [igt-dev] [v3 4/9] tests/kms_plane_scaling: Downscaling " Swati Sharma
2022-02-09 8:31 ` Ville Syrjälä
2022-02-14 16:40 ` Sharma, Swati2
2022-02-08 5:50 ` [igt-dev] [v3 5/9] tests/kms_plane_scaling: Upscaling on 2 planes Swati Sharma
2022-02-09 8:36 ` Ville Syrjälä
2022-02-14 16:42 ` Sharma, Swati2
2022-02-08 5:50 ` [igt-dev] [v3 6/9] tests/kms_plane_scaling: Downscaling " Swati Sharma
2022-02-08 5:50 ` [igt-dev] [v3 7/9] tests/kms_plane_scaling: Upscaling and downscaling scenario Swati Sharma
2022-02-08 5:50 ` [igt-dev] [v3 8/9] tests/kms_plane_scaling: Add negative test to check num of scalers Swati Sharma
2022-02-08 5:50 ` [igt-dev] [v3 9/9] tests/kms_plane_scaling: Refactor clipping-clamping subtest Swati Sharma
2022-02-08 6:25 ` [igt-dev] ✗ Fi.CI.BAT: failure for Addition of new plane scaling test cases (rev3) Patchwork
2022-02-08 9:47 ` [igt-dev] ✗ Fi.CI.BAT: failure for Addition of new plane scaling test cases (rev4) Patchwork
2022-02-08 22:04 ` [igt-dev] ✓ Fi.CI.BAT: success for Addition of new plane scaling test cases (rev5) Patchwork
2022-02-08 23:50 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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=YgN60QgnQeCnbnh5@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@intel.com \
/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