public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Kahola, Mika" <mika.kahola@intel.com>
To: "juhapekka.heikkila@gmail.com" <juhapekka.heikkila@gmail.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t v2] tests/kms_cursor_legacy: Wait for an extra vblank
Date: Thu, 16 Apr 2020 11:32:31 +0000	[thread overview]
Message-ID: <d84facfe6e7a41a09ca32a11d664cad3@intel.com> (raw)
In-Reply-To: <159c568c-7560-950c-5e73-6e7b2444a317@gmail.com>

> -----Original Message-----
> From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Sent: Thursday, April 16, 2020 12:57 PM
> To: Kahola, Mika <mika.kahola@intel.com>; igt-dev@lists.freedesktop.org
> Subject: Re: [PATCH i-g-t v2] tests/kms_cursor_legacy: Wait for an extra vblank
> 
> On 16.4.2020 9.10, Mika Kahola wrote:
> > kms_cursor_legacy IGT subtest 2x-nonblocking-modeset-vs-cursor-atomic
> > is failing due to busyness while trying to do atomic commit. In case,
> > we are busy, let's just wait one extra vblank before continuing the
> > test.
> >
> > References: https://gitlab.freedesktop.org/drm/intel/issues/1062
> >
> > v2: Wait out for max 5 seconds for commit busyness (Juha-Pekka)
> >
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > ---
> >   tests/kms_cursor_legacy.c | 6 +++++-
> >   1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> > index d5f95b8d..6467e646 100644
> > --- a/tests/kms_cursor_legacy.c
> > +++ b/tests/kms_cursor_legacy.c
> > @@ -927,7 +927,11 @@ static void
> > two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
> >
> >   		if (ret == -EBUSY) {
> >   			/* Force completion on both pipes, and generate event.
> */
> > -			igt_display_commit_atomic(display, flags, NULL);
> > +			while (ret == -EBUSY) {
> > +				igt_set_timeout(5, "stuck with -EBUSY");
> 
> Timeout should be set outside while loop.
Right, otherwise we just keep resetting the timeout on each iteration.

> 
> > +				igt_wait_for_vblank(display->drm_fd, pipe);
> 
> I don't think vblank wait here does any good, that ebusy doesn't depend on
> vblank.
Actually, there is a similar functionality later in that function. It would be useful just use that routine here as well. I move this into a separate function, so code repetition is avoided.

> 
> > +				ret = igt_display_try_commit_atomic(display,
> flags, NULL);
> > +			}
> 
> You should call igt_reset_timeout() here. If not reaching next timeout block
> from here within this timeout this timer will fail the test.
> 
> >
> >   			while (nloops--) {
> >   				shared[1] = nloops & 1;
> >

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-04-16 11:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16  6:10 [igt-dev] [PATCH i-g-t v2] tests/kms_cursor_legacy: Wait for an extra vblank Mika Kahola
2020-04-16  6:58 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_legacy: Wait for an extra vblank (rev4) Patchwork
2020-04-16  9:56 ` [igt-dev] [PATCH i-g-t v2] tests/kms_cursor_legacy: Wait for an extra vblank Juha-Pekka Heikkila
2020-04-16 11:32   ` Kahola, Mika [this message]
2020-04-17  2:59 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_cursor_legacy: Wait for an extra vblank (rev4) Patchwork
2020-04-17  6:58   ` Kahola, Mika

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=d84facfe6e7a41a09ca32a11d664cad3@intel.com \
    --to=mika.kahola@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.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