[PATCH] DRI2: By default, throttle after two pending swaps.

Chris Wilson chris at chris-wilson.co.uk
Tue May 13 00:01:50 PDT 2014


On Mon, May 12, 2014 at 06:30:47PM -0700, Jamey Sharp wrote:
> 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>

No, it is not that simple. GetBuffers() can only be allowed to proceed
after the driver has arranged for the call to return the right buffers
to the client. In the event that a client scheduled a future swap, most
drivers will defer the buffer exchange until the swap is actually
performed - limiting the client to double buffering to avoid
complications in reporting the wrong buffers.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the xorg-devel mailing list