[RFC] dri2: Expose API for drivers to set drawable swap limit.

Pauli Nieminen suokkos at gmail.com
Thu Jul 15 01:45:36 PDT 2010


On Thu, Jul 15, 2010 at 9:56 AM, Pauli Nieminen
<ext-pauli.nieminen at nokia.com> wrote:
> On 14/07/10 17:37 +0200, ext Jesse Barnes wrote:
>> On Wed, 14 Jul 2010 16:20:40 +0300
>> Pauli Nieminen <ext-pauli.nieminen at nokia.com> wrote:
>>
>> > This allows ddx to set swap_limit if there is variable number of
>> > buffers for drawable.
>> >
>> > This allows ddx driver to select triple buffering to avoid problems if
>> > frame rate is close to VSYNC rate. While driver may want to keep
>> > composite swaps double buffered to save memory.
>> >
>> > Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
>> > ---
>>
>> Have you tested this?  I think there are a few things on the server
>> side that need work to make triple (or more) buffering work.  Here's
>> the patch I last used to work on it...
>>
>> To make things fast, you'll need some extra buffers allocated in the
>> DRI2 drawable, and you'll need to switch between them at swapbuffers
>> time, along with upping the swap_limit.
>>
>> --
>> Jesse Barnes, Intel Open Source Technology Center
>
> Yes. It works. DDX is allocating 3 buffers behind DRI2.
>
> ScheduleSwap does all the dirty work and rotates backing buffers for DRI2
> buffers.
>
> Pauli
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>

I tough this a bit more. DRI2SwapLimit should check throttling if
client should be unblocked because we got one buffer more.

Pauli


More information about the xorg-devel mailing list