From: Mika Kahola <mika.kahola@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Vidya Srinivas <vidya.srinivas@intel.com>
Subject: Re: [PATCH i-g-t v3 8/8] tests/kms_plane_scaling: test for multi pipe with scaling, v3.
Date: Tue, 16 Jan 2018 15:56:10 +0200 [thread overview]
Message-ID: <1516110970.12453.123.camel@intel.com> (raw)
In-Reply-To: <8c3f743d-6ec3-ea86-3983-82d0896be436@linux.intel.com>
On Tue, 2018-01-16 at 14:47 +0100, Maarten Lankhorst wrote:
> Op 16-01-18 om 14:46 schreef Mika Kahola:
> >
> > On Mon, 2018-01-15 at 15:28 +0100, Maarten Lankhorst wrote:
> > >
> > > From: Jyoti Yadav <jyoti.r.yadav@intel.com>
> > >
> > > Add a subtest to display primary and overlay planes on two
> > > connected pipes and runs scaling test on both pipes
> > >
> > > Changes since v1:
> > > - Commit first before trying any scaling. (Maarten)
> > > - Use the same logic as kms_cursor_legacy to find a pipe and
> > > output.
> > > (Maarten)
> > > - Rework test to work with how cleanup is handled. (Maarten)
> > > Changes since v2:
> > > - Use get_num_scalers() to only use 2 scalers if available.
> > > (Maarten)
> > >
> > > 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>
> > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.c
> > > om>
> > > ---
> > > tests/kms_plane_scaling.c | 93
> > > ++++++++++++++++++++++++++++++++++++++++++++++-
> > > 1 file changed, 92 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/tests/kms_plane_scaling.c
> > > b/tests/kms_plane_scaling.c
> > > index 36a6a8ef042b..8dbacf67b0a0 100644
> > > --- a/tests/kms_plane_scaling.c
> > > +++ b/tests/kms_plane_scaling.c
> > > @@ -38,10 +38,12 @@ typedef struct {
> > > int image_w;
> > > int image_h;
> > >
> > > - struct igt_fb fb[3];
> > > + struct igt_fb fb[4];
> > > +
> > > igt_plane_t *plane1;
> > > igt_plane_t *plane2;
> > > igt_plane_t *plane3;
> > > + igt_plane_t *plane4;
> > > } data_t;
> > >
> > > static int get_num_scalers(uint32_t devid, enum pipe pipe)
> > > @@ -456,6 +458,92 @@
> > > test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe
> > > pipe, igt_outpu
> > > igt_display_commit2(&d->display, COMMIT_ATOMIC);
> > > }
> > >
> > > +static void find_connected_pipe(igt_display_t *display, bool
> > > second,
> > > enum pipe *pipe, igt_output_t **output)
> > > +{
> > > + enum pipe first = PIPE_NONE;
> > > + igt_output_t *first_output = NULL;
> > > + bool found = false;
> > > +
> > > + for_each_pipe_with_valid_output(display, *pipe, *output)
> > > {
> > > + if (first == *pipe || *output == first_output)
> > > + continue;
> > > +
> > > + if (second) {
> > > + first = *pipe;
> > > + first_output = *output;
> > > + second = false;
> > > + continue;
> > > + }
> > > +
> > > + return;
> > > + }
> > > +
> > > + if (first_output)
> > > + igt_require_f(found, "No second valid output
> > > found\n");
> > > + else
> > > + igt_require_f(found, "No valid outputs
> > > found\n");
> > > +}
> > > +
> > > +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;
> > > + enum pipe pipe1, pipe2;
> > > +
> > > + cleanup_crtc(d);
> > > +
> > > + find_connected_pipe(display, false, &pipe1, &output1);
> > > + find_connected_pipe(display, true, &pipe2, &output2);
> > > +
> > > + igt_skip_on(!output1 || !output2);
> > > +
> > > + igt_output_set_pipe(output1, pipe1);
> > > + igt_output_set_pipe(output2, pipe2);
> > > +
> > > + d->plane1 = igt_output_get_plane(output1, 0);
> > > + d->plane2 = get_num_scalers(d->devid, pipe1) >= 2 ?
> > > igt_output_get_plane(output1, 1) : NULL;
> > > + d->plane3 = igt_output_get_plane(output2, 0);
> > > + d->plane4 = get_num_scalers(d->devid, pipe2) >= 2 ?
> > > igt_output_get_plane(output2, 1) : NULL;
> > Maybe use DRM plane type definitions DRM_PLANE_TYPE_OVERLAY and
> > DRM_PLANE_TYPE_PRIMARY instead of 0 and 1 to better indicate what
> > plane
> > we are referring to.
> igt_output_get_plane takes an index, igt_output_get_plane_type takes
> those definitions.
> I've been bit a few times by that as well. :)
yeah, you're absolutely right. Should have read more carefully :)
You can bash my r-b.
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
>
> ~Maarten
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-01-16 13:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 14:28 [PATCH i-g-t v3 0/8] kms_plane_scaling tests Maarten Lankhorst
2018-01-15 14:28 ` [PATCH i-g-t v3 1/8] tests/kms_plane_scaling: Move the actual test to its own function Maarten Lankhorst
2018-01-15 14:28 ` [PATCH i-g-t v3 2/8] tests/kms_plane_scaling: Fix basic scaling test, v3 Maarten Lankhorst
2018-01-15 14:28 ` [PATCH i-g-t v3 3/8] tests/kms_plane_scaling: Convert from simple test to full test Maarten Lankhorst
2018-01-15 14:28 ` [PATCH i-g-t v3 4/8] tests/kms_plane_scaling: Move get_num_scalers to a function Maarten Lankhorst
2018-01-16 8:22 ` Mika Kahola
2018-01-16 10:03 ` [PATCH i-g-t] tests/kms_plane_scaling: Move get_num_scalers to a function, v2 Maarten Lankhorst
2018-01-16 11:55 ` Mika Kahola
2018-01-15 14:28 ` [PATCH i-g-t v3 5/8] tests/kms_plane_scaling: Clean up tests to work better with igt_kms, v2 Maarten Lankhorst
2018-01-16 9:32 ` Mika Kahola
2018-01-15 14:28 ` [PATCH i-g-t v3 6/8] tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v2 Maarten Lankhorst
2018-01-16 12:43 ` Mika Kahola
2018-01-16 14:00 ` [PATCH i-g-t] tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v3 Maarten Lankhorst
2018-01-16 14:22 ` Mika Kahola
2018-01-15 14:28 ` [PATCH i-g-t v3 7/8] tests/kms_plane_scaling: test scaler with clipping clamping, v3 Maarten Lankhorst
2018-01-16 11:14 ` Mika Kahola
2018-01-15 14:28 ` [PATCH i-g-t v3 8/8] tests/kms_plane_scaling: test for multi pipe with scaling, v3 Maarten Lankhorst
2018-01-16 13:46 ` Mika Kahola
2018-01-16 13:47 ` Maarten Lankhorst
2018-01-16 13:56 ` Mika Kahola [this message]
2018-01-17 9:23 ` Maarten Lankhorst
2018-01-15 16:05 ` ✓ Fi.CI.BAT: success for kms_plane_scaling tests Patchwork
2018-01-15 19:25 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-16 9:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-01-16 10:24 ` ✓ Fi.CI.BAT: success for kms_plane_scaling tests. (rev2) Patchwork
2018-01-16 11:14 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-16 14:59 ` ✓ Fi.CI.BAT: success for kms_plane_scaling tests. (rev3) Patchwork
2018-01-16 16:43 ` ✗ Fi.CI.IGT: warning " Patchwork
2018-01-17 10:05 ` [PATCH i-g-t v3 0/8] kms_plane_scaling tests Daniel Vetter
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=1516110970.12453.123.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--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