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

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

On Tue, May 13, 2014 at 12:18:49AM -0700, Jamey Sharp wrote:
> On Tue, May 13, 2014 at 12:01 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > 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.
> >
> > 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.
> Alright. How do you believe the Intel driver's buggy and unusable
> implementation of OML_sync_control should be fixed?
> I'd also be delighted to see patches to make SNA pass the new Piglit
> tests. I tried to fix that before I turned to UXA but I got lost in
> too many different DRI2SwapComplete calls with spec-violating
> parameters before I even got to checking whether it was reliably
> syncing to vertical retrace. I'd be happy to send along the one patch
> I could figure out if you want it though.

=0 ickle:/usr/src/piglit$ ./bin/glx-oml-sync-control-getmscrate 
PIGLIT: {'result': 'pass' }
=0 ickle:/usr/src/piglit$ ./bin/glx-oml-sync-control-waitformsc 
PIGLIT: {'result': 'pass' }
=0 ickle:/usr/src/piglit$ ./bin/glx-oml-sync-control-swapbuffersmsc-divisor-zero 
PIGLIT: {'result': 'pass' }
=0 ickle:/usr/src/piglit$ ./bin/glx-oml-sync-control-swapbuffersmsc-return 
Testing with default swap interval
PIGLIT: {'result': 'pass' }

Am I missing something?

Chris Wilson, Intel Open Source Technology Centre

More information about the xorg-devel mailing list