public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: Mika Kahola <mika.kahola@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v3] tests/kms_cursor_legacy: Wait for an extra vblank
Date: Fri, 17 Apr 2020 17:43:10 +0300	[thread overview]
Message-ID: <08a08eea-3b79-4347-5377-47e7413b9e51@gmail.com> (raw)
In-Reply-To: <20200416131915.533-1-mika.kahola@intel.com>

I don't think that fifo underrun error on kbl has anything to do with 
your patch.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>

On 16.4.2020 16.19, 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)
> v3: Move igt_set_timeout() outside of the loop, remove wait for vblank (Juha-Pekka)
>      Move routine that waits for -ebusy into a separate function
> 
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>   tests/kms_cursor_legacy.c | 22 +++++++++++++++-------
>   1 file changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> index d5f95b8d..ba66e1bd 100644
> --- a/tests/kms_cursor_legacy.c
> +++ b/tests/kms_cursor_legacy.c
> @@ -852,6 +852,19 @@ static void nonblocking_modeset_vs_cursor(igt_display_t *display, int loops)
>   	igt_remove_fb(display->drm_fd, &cursor_fb);
>   }
>   
> +static void wait_for_modeset(igt_display_t *display, unsigned flags, int timeout,
> +			     const char *info)
> +{
> +	int ret;
> +
> +	igt_set_timeout(timeout, info);
> +	do {
> +		ret = igt_display_try_commit_atomic(display, flags, NULL);
> +	} while (ret == -EBUSY);
> +	igt_assert(!ret);
> +	igt_reset_timeout();
> +}
> +
>   static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool modeset, bool atomic)
>   {
>   	struct drm_mode_cursor arg1[2], arg2[2];
> @@ -927,7 +940,7 @@ 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);
> +			wait_for_modeset(display, flags, 5, "Stuck with -EBUSY");
>   
>   			while (nloops--) {
>   				shared[1] = nloops & 1;
> @@ -945,12 +958,7 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
>   				igt_output_set_pipe(output2, enabled ? PIPE_NONE : pipe2);
>   				enabled = !enabled;
>   
> -				igt_set_timeout(5, "Scheduling modeset\n");
> -				do {
> -					ret = igt_display_try_commit_atomic(display, flags, NULL);
> -				} while (ret == -EBUSY);
> -				igt_assert(!ret);
> -				igt_reset_timeout();
> +				wait_for_modeset(display, flags, 5, "Scheduling modeset");
>   			}
>   
>   			goto done;
> 

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

  parent reply	other threads:[~2020-04-17 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 13:19 [igt-dev] [PATCH i-g-t v3] tests/kms_cursor_legacy: Wait for an extra vblank Mika Kahola
2020-04-16 13:44 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_legacy: Wait for an extra vblank (rev5) Patchwork
2020-04-17 10:25 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_legacy: Wait for an extra vblank (rev6) Patchwork
2020-04-17 14:26 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_cursor_legacy: Wait for an extra vblank (rev5) Patchwork
2020-04-17 14:43 ` Juha-Pekka Heikkila [this message]
2020-04-20  6:50   ` [igt-dev] [PATCH i-g-t v3] tests/kms_cursor_legacy: Wait for an extra vblank Kahola, Mika
2020-04-18  7:50 ` [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_cursor_legacy: Wait for an extra vblank (rev6) 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=08a08eea-3b79-4347-5377-47e7413b9e51@gmail.com \
    --to=juhapekka.heikkila@gmail.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=mika.kahola@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