xserver: Branch 'master' - 2 commits
Adam Jackson
ajax at kemper.freedesktop.org
Mon Nov 9 12:54:26 PST 2015
present/present.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
New commits:
commit 2203735887ab548b3ee004400d1b89149aae412c
Author: Axel Davy <axel.davy at ens.fr>
Date: Wed Nov 4 18:42:42 2015 +0100
present: Fix Async swap logic
According to the spec, PresentOptionAsync should only
trigger a different behaviour when the target msc has been reached.
In this case if the driver is able to do async swaps, we use
them to avoid a screen copy.
When the target msc hasn't been reached yet, we want to use sync swaps.
v2: Fix indentation and simplify checks for Async flips
Signed-off-by: Axel Davy <axel.davy at ens.fr>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
diff --git a/present/present.c b/present/present.c
index 5900c22..beb01dc 100644
--- a/present/present.c
+++ b/present/present.c
@@ -836,19 +836,20 @@ present_pixmap(WindowPtr window,
vblank->notifies = notifies;
vblank->num_notifies = num_notifies;
- if (!(options & PresentOptionAsync))
- vblank->sync_flip = TRUE;
-
- if (!(options & PresentOptionCopy) &&
- !((options & PresentOptionAsync) &&
- (!screen_priv->info ||
- !(screen_priv->info->capabilities & PresentCapabilityAsync))) &&
- pixmap != NULL &&
- present_check_flip (target_crtc, window, pixmap, vblank->sync_flip, valid, x_off, y_off))
- {
- vblank->flip = TRUE;
- if (vblank->sync_flip)
+ if (pixmap != NULL &&
+ !(options & PresentOptionCopy) &&
+ screen_priv->info) {
+ if (target_msc > crtc_msc &&
+ present_check_flip (target_crtc, window, pixmap, TRUE, valid, x_off, y_off))
+ {
+ vblank->flip = TRUE;
+ vblank->sync_flip = TRUE;
target_msc--;
+ } else if ((screen_priv->info->capabilities & PresentCapabilityAsync) &&
+ present_check_flip (target_crtc, window, pixmap, FALSE, valid, x_off, y_off))
+ {
+ vblank->flip = TRUE;
+ }
}
if (wait_fence) {
commit 3f35909acba117dc8934920d788c7ce612bce444
Author: Jammy Zhou <Jammy.Zhou at amd.com>
Date: Wed Oct 28 18:39:10 2015 +0800
present: Execute right away if target_msc equals current_msc
It is according to the protocol:
"If 'options' contains PresentOptionAsync, and the 'target-msc'
is less than or equal to the current msc for 'window', then
the operation will be performed as soon as possible, not
necessarily waiting for the next vertical blank interval."
Signed-off-by: Jammy Zhou <Jammy.Zhou at amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Axel Davy <axel.davy at ens.fr>
diff --git a/present/present.c b/present/present.c
index beb4ff0..5900c22 100644
--- a/present/present.c
+++ b/present/present.c
@@ -871,7 +871,7 @@ present_pixmap(WindowPtr window,
xorg_list_add(&vblank->event_queue, &present_exec_queue);
vblank->queued = TRUE;
- if ((pixmap && target_msc >= crtc_msc) || (!pixmap && target_msc > crtc_msc)) {
+ if (target_msc > crtc_msc) {
ret = present_queue_vblank(screen, target_crtc, vblank->event_id, target_msc);
if (ret == Success)
return Success;
More information about the xorg-commit
mailing list