Swap limit

Pauli Nieminen ext-pauli.nieminen at nokia.com
Wed Dec 8 08:15:24 PST 2010


On 08/12/10 16:55 +0100, ext Alex Deucher wrote:
> 
> One other thing that might be worth adding to DRI2 is a way for the
> driver to access the swap interval.  If we could, then the driver
> could dynamically disable things like vline waits for buffer blits or
> do non-vsynced pageflipping more easily if the swap interval was 0.
> 

Actually I tough DRI2 was already telling SwapInteval with 

*swap_target = pPriv->last_swap_target + pPriv->swap_interval;

If swap_target doesn't advance then driver would know to flip as fast as
possible.

But then I noticed a bug.

First one is that we always blit with swapinterval is zero when it should be
possible to flip (even tear free).

Code from DRI2ScheduleSwap:
/* Old DDX or no swap interval, just blit */
if (!ds->ScheduleSwap || !pPriv->swap_interval) {

But then this would hit the MSC workaround in DRI2 code that does

if (current_msc < pPriv->last_swap_target)
    pPriv->last_swap_target = current_msc;

This would then cause DRI2 code to schedule swap to current msc that driver
could see as meaning flip should happen as fast as possible and maybe discard
frames that are coming too fast.

Pauli


More information about the xorg-devel mailing list