mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 08:10:03 +01:00
present: Fix presentation of flips out of order
The flip queue currently only holds events submitted to the driver for flipping, awaiting the completion notifier. It is short. We therefore can speed up interrupt processing by keeping the small number of events ready to be flipped on the end of the flip queue. By appending the events to the flip_queue in the order that they become ready, we also resolve one issue causing Present to display frames out of order. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-and-tested-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
fbe660b765
commit
bab0f450a7
1 changed files with 6 additions and 3 deletions
|
|
@ -353,10 +353,10 @@ present_re_execute(present_vblank_ptr vblank)
|
|||
static void
|
||||
present_flip_try_ready(ScreenPtr screen)
|
||||
{
|
||||
present_vblank_ptr vblank, tmp;
|
||||
present_vblank_ptr vblank;
|
||||
|
||||
xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) {
|
||||
if (vblank->flip_ready) {
|
||||
xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) {
|
||||
if (vblank->queued) {
|
||||
present_re_execute(vblank);
|
||||
return;
|
||||
}
|
||||
|
|
@ -656,6 +656,8 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
|
|||
DebugPresent(("\tr %lld %p (pending %p unflip %lld)\n",
|
||||
vblank->event_id, vblank,
|
||||
screen_priv->flip_pending, screen_priv->unflip_event_id));
|
||||
xorg_list_del(&vblank->event_queue);
|
||||
xorg_list_append(&vblank->event_queue, &present_flip_queue);
|
||||
vblank->flip_ready = TRUE;
|
||||
return;
|
||||
}
|
||||
|
|
@ -994,6 +996,7 @@ present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64
|
|||
xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) {
|
||||
if (vblank->event_id == event_id) {
|
||||
xorg_list_del(&vblank->event_queue);
|
||||
vblank->queued = FALSE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue