Time in wayland presentation extension

Pekka Paalanen ppaalanen at gmail.com
Tue Dec 16 05:53:48 PST 2014

On Tue, 16 Dec 2014 14:02:44 +0100
Dan Oscarsson <Dan.Oscarsson at tieto.com> wrote:

> fre 2014-12-12 klockan 17:50 +0200 skrev Pekka Paalanen:
> > > From what I understand vdpau have a hardware presentation queue. I
> > > wonder how that will integrate with a compositor.
> > 
> > Would be interesting to read about that, where did you see it?
> > 
> I cannot find any web page about it.
> What you can find is that vdpau opn NVIDIA hardware have two
> presentation queue implementations:
>   - an overlay presenation queue
>   - a blit-based presentation queue
> The overlay based, which I expect is using hardware in its
> implementation, gives very good display of frames synchronised to vsync.
> It gives no flicker and is the one you want when you watch movies.

That still does not imply any hardware queue, does it?

Naturally, updating an overlay independently is more reliable timing
wise, because other system and GPU load has little effect. Doing a copy
(blit) is a different thing, and if there are lots of data to blit, it's
not certain one even can do it in time at all.

> The bit-based, which is used when hardware overlay is not available,
> which I assume is software based, is not as good and will not always
> succeed to sync to vsync.

Right. There's also the question whether you blit to the front buffer
that is being scanned out, or to a back buffer and then flip.

Weston will neved blit/draw to the front buffer under DRM, it always
flips. Whether e.g. video from a player window goes through compositing
or directly to an overlay is completely up to the compositor, and the
compositor is able to decide it frame by frame.

Weston today does not use hardware overlays, since the KMS API for
controlling them is inadequate for it. Atomic modesetting / nuclear
pageflip work in the kernel DRM will provide a better API, and then
Weston can start using overlays. Overlays are not limited to video or
applications that specifically ask for it (since you can't specifically
ask for it on Wayland), but all windows that have scanout-able buffers,
which could include e.g. OpenGL games.

Btw. if you have a video player using overlay vdpau path, and you move
that window, does the overlay lag behind like in the old Xv times?

That's another thing we are fixing with Wayland: atomic, synchronized
updates. And that is why we need the atomic/nuclear to have overlays
working in Weston.

> It will be interesting to see what happens when NVIDIA makes their
> binary driver work with Wayland and how they get vdpau to work well
> there. It have to work as well or better then under X11, to make Wayland
> a good choice for people watching movies under Linux.

Yup, lots on interesting things to be seen there one day, starting with
mode setting.

And if/when they enable Wayland, they also enable stand-alone video
players, in case someone doesn't like any display server as a


More information about the wayland-devel mailing list