<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Weston almost halves *visible* frame update rate from what application actually produces"
href="https://bugs.freedesktop.org/show_bug.cgi?id=106736#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Weston almost halves *visible* frame update rate from what application actually produces"
href="https://bugs.freedesktop.org/show_bug.cgi?id=106736">bug 106736</a>
from <span class="vcard"><a class="email" href="mailto:ppaalanen@gmail.com" title="Pekka Paalanen <ppaalanen@gmail.com>"> <span class="fn">Pekka Paalanen</span></a>
</span></b>
<pre>For an explanation, see:
<a href="http://ppaalanen.blogspot.com/2015/02/weston-repaint-scheduling.html">http://ppaalanen.blogspot.com/2015/02/weston-repaint-scheduling.html</a>
The GPU is traditionally a single task at a time, non-preemptive, sequential
processor. The application and the compositor compete of the GPU.
If an application is not throttled to the frame callback, it's possible it will
start a new frame before it has given the compositor a chance to get the
current frame on screen. When this happens, the compositor has to wait for the
app's new frame to finish before the compositing task can run, and only after
that the compositor can actually show the frame on screen.
Because Weston (all Wayland compositors, ideally) only repaints at most once
for each refresh and always syncs to vblank, it predicts what is the next
vblank it could hit, and makes a delay so that it will have repaint-window
milliseconds of time to submit and finish the composite GPU job. If other GPU
jobs make the compositor miss the vblank, it'll postpone the presentation by a
whole refresh period before weston even considers repainting again.
So the first thing is to make the application "sync to vblank", IOW, make it
repaint only as a response to the frame callback events and see what effect
that makes.
repaint-window should be the lowest possible value where the compositor still
makes the vblank deadline, to reduce application-to-screen latency.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>