All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] igt/kms_flip: Allow reported vblank times to be in the future
Date: Fri, 11 May 2018 16:37:31 +0300	[thread overview]
Message-ID: <20180511133731.GP23723@intel.com> (raw)
In-Reply-To: <20180510160434.15903-1-chris@chris-wilson.co.uk>

On Thu, May 10, 2018 at 05:04:34PM +0100, Chris Wilson wrote:
> The vblank timestamp is given for the end of the vblank, but the
> hardware may report the vblank before that point (so the kernel computes
> a timestamp in the future), and userspace may then see the vblank event
> that says the actual start-of-scanout has yet to happen. All this is
> perfectly legal and can be observed in practice.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106087
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/kms_flip.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 3d6fe948d..5b0d07cc2 100644
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -480,13 +480,6 @@ static void check_state(const struct test_output *o, const struct event_state *e
>  	if (es->count == 0)
>  		return;
>  
> -	timersub(&es->current_ts, &es->last_received_ts, &diff);
> -	igt_assert_f(timercmp(&es->last_received_ts, &es->current_ts, <),

last_received_ts is the time we received the previous event isn't it? So
somehow our current event's kernel reported timestamp is older than the
the time we received the previous event. So the kernel failed to send
events when it was supposed to, or we failed to process them in a timely
fashion perhaps?

> -		     "%s ts before the %s was issued!\n"
> -		     "timerdiff %ld.%06ld\n",
> -		     es->name, es->name,
> -		     diff.tv_sec, diff.tv_usec);
> -
>  	/* check only valid if no modeset happens in between, that increments by
>  	 * (1 << 23) on each step. This bounding matches the one in
>  	 * DRM_IOCTL_WAIT_VBLANK. */
> -- 
> 2.17.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2018-05-11 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 16:04 [igt-dev] [PATCH i-g-t] igt/kms_flip: Allow reported vblank times to be in the future Chris Wilson
2018-05-10 16:26 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-05-10 17:17 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-05-11 13:37 ` Ville Syrjälä [this message]
2018-05-11 13:50   ` [igt-dev] [PATCH i-g-t] " Chris Wilson
2018-05-11 14:36     ` Ville Syrjälä
2018-05-12  9:10       ` Chris Wilson

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=20180511133731.GP23723@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.