From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Vidya Srinivas <vidya.srinivas@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: daniel.vetter@intel.com
Subject: Re: [PATCH i-g-t 6/6] i-g-t: kms_plane_scaling: test for multi pipe with scaling
Date: Tue, 9 Jan 2018 15:00:40 +0100 [thread overview]
Message-ID: <1af21ff1-e9d6-0a30-d3f1-3a1f1cde0656@linux.intel.com> (raw)
In-Reply-To: <1513158652-8912-7-git-send-email-vidya.srinivas@intel.com>
Op 13-12-17 om 10:50 schreef Vidya Srinivas:
> From: Jyoti Yadav <jyoti.r.yadav@intel.com>
>
> Patch adds subtest to display primary and overlay planes on two
> connected pipes and runs scaling test on both pipes
>
> Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
> tests/kms_plane_scaling.c | 114 +++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 112 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index b80cafb..bbdf3f3 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -43,9 +43,11 @@ typedef struct {
> struct igt_fb fb1;
> struct igt_fb fb2;
> struct igt_fb fb3;
> + struct igt_fb fb4;
> int fb_id1;
> int fb_id2;
> int fb_id3;
> + int fb_id4;
>
> igt_plane_t *plane1;
> igt_plane_t *plane2;
> @@ -101,6 +103,24 @@ static uint64_t get_tiling(int tiling)
> }
> }
>
> +static igt_output_t *get_next_valid_output(igt_display_t *data, int i)
> +{
> + int j = 0, valid_output = 0;
> + drmModeModeInfo *mode;
> +
> + for (j = 0; j < data->n_outputs; j++) {
> + if (igt_output_is_connected(&data->outputs[j])) {
> + mode = igt_output_get_mode(&data->outputs[j]);
> + if (mode->hdisplay != 0 && mode->vdisplay != 0) {
> + valid_output++;
> + if (valid_output == i)
> + return &data->outputs[j];
> + }
> + }
> + }
> + return NULL;
> +}
> +
> static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
> igt_plane_t *plane, drmModeModeInfo *mode, enum igt_commit_style s)
> {
> @@ -545,6 +565,93 @@ test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe)
> }
> }
>
> +static void test_scaler_with_multi_pipe_plane(data_t *d)
> +{
> + igt_display_t *display = &d->display;
> + igt_output_t *output1, *output2;
> + drmModeModeInfo *mode1, *mode2;
> +
> + output1 = get_next_valid_output(display, 1);
> + output2 = get_next_valid_output(display, 2);
> +
> + igt_skip_on(!output1 || !output2);
> +
> + igt_output_set_pipe(output1, PIPE_ANY);
> + igt_output_set_pipe(output2, PIPE_ANY);
> +
> + igt_output_set_pipe(output1, 0);
> + igt_output_set_pipe(output2, 1);
You can't do this, hardcoding pipe 0 (A) and 1(B).. See
find_connected_pipe(igt_display_t *display, bool second)
in kms_cursor_legacy how to do it correctly.
Some outputs may have restraints to which pipe they're connected, and that is completely ignored here.
> + d->plane1 = igt_output_get_plane(output1, 0);
> + d->plane2 = igt_output_get_plane(output1, 1);
> + d->plane3 = igt_output_get_plane(output2, 0);
> + d->plane4 = igt_output_get_plane(output2, 1);
> +
> + mode1 = igt_output_get_mode(output1);
> + mode2 = igt_output_get_mode(output2);
> +
> + d->fb_id1 = igt_create_pattern_fb(d->drm_fd, 600, 600,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb1);
> + igt_assert(d->fb_id1);
> +
> + d->fb_id2 = igt_create_pattern_fb(d->drm_fd, 500, 500,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb2);
> + igt_assert(d->fb_id2);
> +
> + d->fb_id3 = igt_create_pattern_fb(d->drm_fd, 700, 700,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb3);
> + igt_assert(d->fb_id3);
> +
> + d->fb_id4 = igt_create_pattern_fb(d->drm_fd, 400, 400,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb4);
> + igt_assert(d->fb_id4);
This looks a bit double, how come we don't have a helper for this?
> + igt_plane_set_fb(d->plane1, &d->fb1);
> + igt_plane_set_fb(d->plane2, &d->fb2);
> + igt_plane_set_fb(d->plane3, &d->fb3);
> + igt_plane_set_fb(d->plane4, &d->fb4);
> +
> + /* Upscaling Primary */
> + igt_plane_set_size(d->plane1, mode1->hdisplay, mode1->vdisplay);
> + igt_plane_set_size(d->plane3, mode2->hdisplay, mode2->vdisplay);
> + igt_display_commit2(display, COMMIT_ATOMIC);
> +
> + /* Upscaling Sprites */
> + igt_plane_set_size(d->plane2, mode1->hdisplay, mode1->vdisplay);
> + igt_plane_set_size(d->plane4, mode2->hdisplay, mode2->vdisplay);
> + igt_display_commit2(display, COMMIT_ATOMIC);
What about downscale?
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2018-01-09 14:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 9:50 [PATCH i-g-t 0/6] kms_plane_scaling fixes and enhancement Vidya Srinivas
2017-12-13 9:50 ` [PATCH i-g-t 1/6] i-g-t: kms_plane_scaling: Fix basic scaling test Vidya Srinivas
2018-01-04 14:56 ` Maarten Lankhorst
2018-01-05 3:45 ` Srinivas, Vidya
2017-12-13 9:50 ` [PATCH i-g-t 2/6] i-g-t: lib: Add plane pixel format support Vidya Srinivas
2018-01-09 12:10 ` Maarten Lankhorst
2018-01-09 12:32 ` Maarten Lankhorst
2017-12-13 9:50 ` [PATCH i-g-t 3/6] i-g-t: lib/igt_kms: Run kms_plane for all supported pixel formats Vidya Srinivas
2018-01-09 12:24 ` Maarten Lankhorst
2017-12-13 9:50 ` [PATCH i-g-t 4/6] i-g-t kms_plane_scaling: test scaling with tiling rotation and " Vidya Srinivas
2017-12-14 10:55 ` Daniel Vetter
2017-12-14 17:41 ` Srinivas, Vidya
2018-01-09 12:33 ` Maarten Lankhorst
2017-12-13 9:50 ` [PATCH i-g-t 5/6] i-g-t: kms_plane_scaling: test scaler with clipping clamping Vidya Srinivas
2017-12-13 9:50 ` [PATCH i-g-t 6/6] i-g-t: kms_plane_scaling: test for multi pipe with scaling Vidya Srinivas
2018-01-09 14:00 ` Maarten Lankhorst [this message]
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=1af21ff1-e9d6-0a30-d3f1-3a1f1cde0656@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=vidya.srinivas@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