unique id for wayland objects

zou lan nancy.lan.zou at gmail.com
Thu May 24 07:26:23 UTC 2018

Hi pekka

>>are the c2p numbers from weston-presentation-shm demo?
yes. I use this demo. My clock is  CLOCK_MONOTONIC.

I check the drm kernel code, I find each vblank event send the last
vblank's timestamp.

system time                             sec  msec
[  263.000526] vblank_event  262  983
[  263.017236] vblank_event 263    0
[  263.033864] vblank_event  263   17
[  263.050533] vblank_event  263    33
[  263.067215] vblank_event  263    50

I think that's should be the main reason cause the c2p time weird. I don't
know why kernel return last frame's timestamp. I am still debuging it.

Best Regards

2018-05-22 15:51 GMT+08:00 Pekka Paalanen <ppaalanen at gmail.com>:

> On Mon, 21 May 2018 23:06:12 +0800
> zou lan <nancy.lan.zou at gmail.com> wrote:
> > Hi pekka
> >
> > I debug the presentation time recently. I have checked each user call
> > drmAtomicCommit get the corresponding pageflip event.
> > But some presentation results (c2p) are a little weird. They are 1~5ms or
> > -1 ~ -5 ms. some results are normal(8 ~ 20 ms).
> > I used to explain the weird result is because  pageflip return last
> frame's
> > timestamp, but I can't explain the normal results.
> >
> > I suspect whether the kernel and user have the same time start point.
> It's
> > just a guess, I have no evidence.
> >
> > Do you have some tips about the c2p results? Thank you.
> Hi Nancy,
> are the c2p numbers from weston-presentation-shm demo?
> The presentation-time extension has an event to tell the client which
> clock domain is being used for the timestamps. This comes from DRM,
> Weston attempts to enable CLOCK_MONOTONIC, but if your kernel is
> ancient or otherwise weird, the default in DRM is CLOCK_REALTIME.
> Check your weston log for these lines:
>                presentation clock: CLOCK_MONOTONIC, id 1
>                presentation clock resolution: 0.000000001 s
> If the resolution is much coarser than this, you have a kernel build
> configuration issue.
> If all that checks out and you see the problem even with unmodified
> weston, then I would suspect a driver bug, but it's hard to tell.
> You may want to grab a timeline recording and post that compressed. We
> can then use wesgr to visualize it:
> https://github.com/ppaalanen/wesgr
> You can start and stop the recording by typing Mod+Shift+Space, 't'. It
> writes a file to weston's current working directory and you see it
> mentioned in the log as well.
> The c2p times should really not vary much. On an intel GPU, with 60 Hz
> display, the default mode of weston-presentation-shm gives me a steady
> 23-24 ms c2p. This is the default repaint window setting. If I use the
> low latency mode (-p), I get c2p 17-18 ms. (The intel driver can
> actually send the pageflip event a little earlier than the timestamp it
> carries, because it predicts the vblank when it's sure the presentation
> will happen.)
> I also found a crash bug in Weston just now when playing with
> weston-presentation-shm, probably related to a patch I recently landed.
> Thanks,
> pq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180524/804ea863/attachment.html>

More information about the wayland-devel mailing list