unique id for wayland objects

Pekka Paalanen ppaalanen at gmail.com
Wed May 30 12:48:59 UTC 2018


On Wed, 30 May 2018 18:33:40 +0800
zou lan <nancy.lan.zou at gmail.com> wrote:

> Hi pekka
> 
> I'm not familiar with kernel. I know part of drm driver is implement by
> ourself. I check the vblank callback function, it sends pageflip event
> first if there is a frame complete, update vblank timestamp later.
> 
> I don't know why the owner write code like this. but if I swap the code
> order, the fps  decrease a lot.

Hi Nancy,

I do not know your hardware, so I cannot say why fps decreases, but the
order of sending event first and updating the timestamp later does
sound wrong to me. I do not know what would be the right solution for
your hardware to get the correct timestamp with the event.

What are the exact fps numbers you observe and what is your display
refresh rate (the video mode)?

> I can sure this impact the weston's page flip timestamp. Does this have
> some impacts to weston except timeline?

Weston schedules a repaint based on the pageflip timestamp. If the
timestamp is in the past by a whole refresh period, the computed new
deadline will be in the past as well, so Weston will attempt to repaint
as soon as possible.

The intended behaviour is that Weston repaints at most once for each
display refresh cycle, the deadline being 7 ms (if using the default
value of repaint-window) before the next vblank. In other words, there
should be a significant delay (say, 50-90% of a refresh period) between
receiving the pageflip event and repaint.

> I study a little about timeline, I think the picture could still show the
> c2p(interval between damage commit and hit screen). Is it right? Thank you.

That is practically the definition of c2p, yes, if that is your
question. c2p uses the timestamp recorded in the client at commit time,
while timeline has the timestamp of the compositor processing the
commit, so there can be a small difference.


Thanks,
pq


> 2018-05-24 15:42 GMT+08:00 Pekka Paalanen <ppaalanen at gmail.com>:
> 
> > On Thu, 24 May 2018 15:26:23 +0800
> > zou lan <nancy.lan.zou at gmail.com> wrote:
> >  
> > > 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.  
> >
> > Indeed, that does not sound right. Maybe contact the driver developers
> > about this?
> >
> > Which kernel display driver are you using?
> >
> >
> > Thanks,
> > pq
> >  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180530/4c217d04/attachment.sig>


More information about the wayland-devel mailing list