All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
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 14:50:18 +0100	[thread overview]
Message-ID: <152604661828.14639.13428560172168182463@mail.alporthouse.com> (raw)
In-Reply-To: <20180511133731.GP23723@intel.com>

Quoting Ville Syrjälä (2018-05-11 14:37:31)
> 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?

Hmm, I thought it was the timestamp of the last received, which would
be the most recent event...

> 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?

(kms_flip:1495) DEBUG: name = vblank
last_ts = 326.737520
last_received_ts = 326.737347
last_seq = 15665
current_ts = 326.904242
current_received_ts = 328.153186
current_seq = 15675
count = 66
seq_step = 10
(kms_flip:1495) DEBUG: name = vblank
last_ts = 326.904242
last_received_ts = 328.153186
last_seq = 15675
current_ts = 328.137985
current_received_ts = 328.153386
current_seq = 15749
count = 67
seq_step = 10

Ok, should we have rejected the earlier vblank for having a received_ts
more than a frame into the future?
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-05-11 13:50 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 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2018-05-11 13:50   ` Chris Wilson [this message]
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=152604661828.14639.13428560172168182463@mail.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ville.syrjala@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 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.