[PATCH] DRI2: By default, throttle after two pending swaps.
Jamey Sharp
jamey at minilop.net
Mon May 12 18:30:47 PDT 2014
According to Chris Wilson, the Intel driver has a horrifying kludge to
get triple-buffering despite the swap_limit being set to only allow
double-buffering by default. This kludge makes OML_sync_control unusable
if the Intel driver goes into page-flipping mode.
Since triple-buffering is preferred for most applications, let's make it
the default in the server and allow the drivers to quit lying to the X
server about when swaps complete.
I suggest this patch be back-ported to stable releases. Since the Intel
driver, at least, is already forcing applications to use triple
buffering regardless of their SwapLimit setting, it must be safe.
Signed-off-by: Jamey Sharp <jamey at minilop.net>
Signed-off-by: Theo Hill <Theo0x48 at gmail.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Eric Anholt <eric at anholt.net>
Cc: Matt Dew <marcoz at osource.org>
---
hw/xfree86/dri2/dri2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 61bf85e..bff41dc 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -217,7 +217,7 @@ DRI2AllocateDrawable(DrawablePtr pDraw)
if (!ds->GetMSC || !(*ds->GetMSC) (pDraw, &ust, &pPriv->last_swap_target))
pPriv->last_swap_target = 0;
- pPriv->swap_limit = 1; /* default to double buffering */
+ pPriv->swap_limit = 2; /* default to triple buffering */
pPriv->last_swap_msc = 0;
pPriv->last_swap_ust = 0;
xorg_list_init(&pPriv->reference_list);
--
1.9.2
More information about the xorg-devel
mailing list