From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 2/6] kms_vblank: Reorganize subtests by pipe
Date: Wed, 10 Jan 2018 10:04:01 +0100 [thread overview]
Message-ID: <20180110090401.GG13066@phenom.ffwll.local> (raw)
In-Reply-To: <20180110085747.GF13066@phenom.ffwll.local>
On Wed, Jan 10, 2018 at 09:57:47AM +0100, Daniel Vetter wrote:
> On Thu, Jan 04, 2018 at 03:12:39PM +0100, Maarten Lankhorst wrote:
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > ---
> > tests/kms_vblank.c | 93 ++++++++++++++++++++++++++++--------------------------
> > 1 file changed, 49 insertions(+), 44 deletions(-)
> >
> > diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
> > index 342e4ef23b97..e51e96c7f061 100644
> > --- a/tests/kms_vblank.c
> > +++ b/tests/kms_vblank.c
> > @@ -118,49 +118,41 @@ static void run_test(data_t *data, int fd, void (*testfunc)(data_t *, int, int))
> > int nchildren =
> > data->flags & FORKED ? sysconf(_SC_NPROCESSORS_ONLN) : 1;
> > igt_display_t *display = &data->display;
> > - igt_output_t *output;
> > - enum pipe p;
> > + igt_output_t *output = data->output;
> >
> > - for_each_pipe_with_valid_output(display, p, output) {
> > - data->pipe = p;
> > - prepare_crtc(data, fd, output);
> > + prepare_crtc(data, fd, output);
> >
> > - igt_info("Beginning %s on pipe %s, connector %s (%d threads)\n",
> > - igt_subtest_name(),
> > - kmstest_pipe_name(data->pipe),
> > - igt_output_name(output),
> > - nchildren);
> > -
> > - if (data->flags & BUSY) {
> > - union drm_wait_vblank vbl;
> > -
> > - memset(&vbl, 0, sizeof(vbl));
> > - vbl.request.type =
> > - DRM_VBLANK_RELATIVE | DRM_VBLANK_EVENT;
> > - vbl.request.type |= kmstest_get_vbl_flag(data->pipe);
> > - vbl.request.sequence = 120 + 12;
> > - igt_assert_eq(wait_vblank(fd, &vbl), 0);
> > - }
> > + igt_info("Beginning %s on pipe %s, connector %s (%d threads)\n",
> > + igt_subtest_name(), kmstest_pipe_name(data->pipe),
> > + igt_output_name(output), nchildren);
> >
> > - igt_fork(child, nchildren)
> > - testfunc(data, fd, nchildren);
> > - igt_waitchildren();
> > -
> > - if (data->flags & BUSY) {
> > - struct drm_event_vblank buf;
> > - igt_assert_eq(read(fd, &buf, sizeof(buf)), sizeof(buf));
> > - }
> > + if (data->flags & BUSY) {
> > + union drm_wait_vblank vbl;
> >
> > - igt_assert(poll(&(struct pollfd){fd, POLLIN}, 1, 0) == 0);
> > + memset(&vbl, 0, sizeof(vbl));
> > + vbl.request.type =
> > + DRM_VBLANK_RELATIVE | DRM_VBLANK_EVENT;
> > + vbl.request.type |= kmstest_get_vbl_flag(data->pipe);
> > + vbl.request.sequence = 120 + 12;
> > + igt_assert_eq(wait_vblank(fd, &vbl), 0);
> > + }
> >
> > - igt_info("\n%s on pipe %s, connector %s: PASSED\n\n",
> > - igt_subtest_name(),
> > - kmstest_pipe_name(data->pipe),
> > - igt_output_name(output));
> > + igt_fork(child, nchildren)
> > + testfunc(data, fd, nchildren);
> > + igt_waitchildren();
> >
> > - /* cleanup what prepare_crtc() has done */
> > - cleanup_crtc(data, fd, output);
> > + if (data->flags & BUSY) {
> > + struct drm_event_vblank buf;
> > + igt_assert_eq(read(fd, &buf, sizeof(buf)), sizeof(buf));
> > }
> > +
> > + igt_assert(poll(&(struct pollfd){fd, POLLIN}, 1, 0) == 0);
> > +
> > + igt_info("\n%s on pipe %s, connector %s: PASSED\n\n",
> > + igt_subtest_name(), kmstest_pipe_name(data->pipe), igt_output_name(output));
> > +
> > + /* cleanup what prepare_crtc() has done */
> > + cleanup_crtc(data, fd, output);
> > }
> >
> > static void crtc_id_subtest(data_t *data, int fd)
> > @@ -329,6 +321,8 @@ igt_main
> > { "wait", vblank_wait, IDLE | FORKED | BUSY },
> > { }
> > }, *f;
> > + enum pipe p;
> > +
> > const struct {
> > const char *name;
> > unsigned int flags;
> > @@ -352,14 +346,25 @@ igt_main
> > igt_subtest("crtc-id")
> > crtc_id_subtest(&data, fd);
> >
> > - for (f = funcs; f->name; f++) {
> > - for (m = modes; m->name; m++) {
> > - if (m->flags & ~f->valid)
> > - continue;
> > -
> > - igt_subtest_f("%s-%s", f->name, m->name) {
> > - data.flags = m->flags;
> > - run_test(&data, fd, f->func);
> > + for_each_pipe_static(p) igt_subtest_group {
>
> Imo newline and {} and more indent, I was confused for a bit looking where
> you have the igt_subtest_group :-)
>
> Also we need to give the cibuglog folks a headups before pushing ofc.
>
> With the bikeshed addressed:
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
>
> > + igt_fixture
> > + igt_display_require_output_on_pipe(&data.display, p);
> > +
> > + data.pipe = p;
> > +
> > + for (f = funcs; f->name; f++) {
> > + for (m = modes; m->name; m++) {
> > + if (m->flags & ~f->valid)
> > + continue;
> > +
> > + igt_subtest_f("pipe-%s-%s-%s",
> > + kmstest_pipe_name(data.pipe),
> > + f->name, m->name) {
> > + for_each_valid_output_on_pipe(&data.display, data.pipe, data.output) {
> > + data.flags = m->flags;
> > + run_test(&data, fd, f->func);
> > + }
Ok I totally overlooked this one - looping over all output combos still
means tons of modesets within each subtest. How does that make stuff
faster/better?
-Daniel
> > + }
> > }
> > }
> > }
> > --
> > 2.15.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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-10 9:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-04 14:12 [PATCH i-g-t v2 0/6] kms_vblank: Move tests over from kms_flip Maarten Lankhorst
2018-01-04 14:12 ` [PATCH i-g-t v2 1/6] tests/kms_flip: Remove blt/rcs flip tests Maarten Lankhorst
2018-01-10 8:50 ` Daniel Vetter
2018-01-04 14:12 ` [PATCH i-g-t v2 2/6] kms_vblank: Reorganize subtests by pipe Maarten Lankhorst
2018-01-10 8:57 ` Daniel Vetter
2018-01-10 9:04 ` Daniel Vetter [this message]
2018-01-10 10:59 ` Maarten Lankhorst
2018-01-10 12:57 ` Daniel Vetter
2018-01-04 14:12 ` [PATCH i-g-t v2 3/6] tests/kms_flip: Move kms_flip.vblank-vs-hang to kms_vblank, v2 Maarten Lankhorst
2018-01-08 10:23 ` [PATCH v3 i-g-t] tests/kms_flip: Move kms_flip.vblank-vs-hang to kms_vblank, v3 Maarten Lankhorst
2018-01-10 9:30 ` Daniel Vetter
2018-01-04 14:12 ` [PATCH i-g-t v2 4/6] kms_vblank: Add tests implemented in kms_flip Maarten Lankhorst
2018-01-04 14:12 ` [PATCH i-g-t v2 5/6] kms_flip: Remove redundant vblank tests Maarten Lankhorst
2018-01-04 14:12 ` [PATCH i-g-t v2 6/6] kms_vblank: Remove teardown code from cleanup_crtc Maarten Lankhorst
2018-01-10 9:32 ` Daniel Vetter
2018-01-04 14:49 ` ✓ Fi.CI.BAT: success for kms_vblank: Move tests over from kms_flip. (rev2) Patchwork
2018-01-04 16:52 ` ✓ Fi.CI.IGT: " Patchwork
2018-01-08 13:50 ` ✗ Fi.CI.BAT: failure for kms_vblank: Move tests over from kms_flip. (rev3) Patchwork
2018-01-08 15:08 ` ✓ Fi.CI.BAT: success " Patchwork
2018-01-08 20:00 ` ✗ Fi.CI.IGT: warning " 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=20180110090401.GG13066@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.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