diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-05-21 16:17:27 +0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-03-20 12:19:29 +0200 |
commit | 0513a95a06b55921321e41588c19eb41c932032d (patch) | |
tree | 6c684d8df59d34b8e208c53021c2076cbdc5d521 /man | |
parent | 662f384e6a184d6249b01de8437c9cd4027af069 (diff) |
compositor: add repaint delay timer
This timer delays the output_repaint towards the end of the refresh
period, reducing the time from repaint to present.
The length of the repaint window can be set in weston.ini.
The call to weston_output_schedule_repaint_reset() is delayed by one
more period. If we exit the continuous repaint loop (set
output->repaint_scheduled to false) in finish_frame, we may call
start_repaint_loop() unnecessarily. The problem case was actually
observed with two outputs on the DRM backend at 60 Hz, and 7 ms
repaint-window. During a window move, one output was constantly falling
off the continuous repaint loop and introducing additional one frame
latency, leading to jerky window motion. This code now avoids the
problem.
Changes in v2:
- Rename repaint_delay_timer to repaint_timer and
output_repaint_delay_handler to output_repaint_timer_handler.
- When computing the delay, take the current time into account. The timer
uses a relative timeout, so we have to subtract any time already gone.
Note, that 'gone' may also be negative. DRM has a habit of predicting
the page flip timestamp so it may be still in the future when we get the
completion event.
- Do also a sanity check 'msec > 1000'. In the unlikely case that
something fails to provide a good timestamp, never delay for more than
one second.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'man')
-rw-r--r-- | man/weston.ini.man | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/man/weston.ini.man b/man/weston.ini.man index 7a353c93..d7df0e4c 100644 --- a/man/weston.ini.man +++ b/man/weston.ini.man @@ -137,6 +137,16 @@ directory are: .fi .RE .TP 7 +.BI "repaint-window=" N +Set the approximate length of the repaint window in milliseconds. The repaint +window is used to control and reduce the output latency for clients. If the +window is longer than the output refresh period, the repaint will be done +immediately when the previous repaint finishes, not processing client requests +in between. If the repaint window is too short, the compositor may miss the +target vertical blank, increasing output latency. The default value is 7 +milliseconds. The allowed range is from -10 to 1000 milliseconds. Using a +negative value will force the compositor to always miss the target vblank. +.TP 7 .BI "gbm-format="format sets the GBM format used for the framebuffer for the GBM backend. Can be .B xrgb8888, |