xf86-video-ati page flipping fixes

Mario Kleiner mario.kleiner at tuebingen.mpg.de
Thu May 5 09:33:11 PDT 2011


On May 5, 2011, at 6:06 PM, Ville Syrjälä wrote:

> On Thu, May 05, 2011 at 05:09:56PM +0200, Mario Kleiner wrote:
>> On May 5, 2011, at 4:23 PM, Ville Syrjälä wrote:
>>
>>> On Thu, May 05, 2011 at 11:46:45AM +0200, Michel Dänzer wrote:
>>>> On Mit, 2011-05-04 at 23:51 +0300, Ville Syrjala wrote:
>>>>> I came to the conclusion that the xserver DRI2 invalidate patches
>>>>> that
>>>>> have been discussed aren't really fixing the problem. I suppose
>>>>> they may
>>>>> make the problem slightly less likely to happen, but at least for
>>>>> me that
>>>>> likelyhood is still very high. The whole mess looks like a simple
>>>>> driver
>>>>> bug to me.
>>>>
>>>> I think the xserver patches are still necessary, otherwise how are
>>>> the
>>>> cached DRI2 pPriv->buffers updated for other windows sharing the  
>>>> same
>>>> pixmap?
>>>
>>> As the real front buffers are not handed out to clients, there isn't
>>> that much reason to update them. Making sure the fake front buffer
>>> contain a more recent snapshot of the real front would be one reason
>>> though.
>>>
>>
>> Could it be that your patch fixes a closely related, but different
>> bug? During OpenGL rendering, Mesa/Gallium caches the backbuffer
>> assignment and only queries the current assignment from the x-server
>> if its drawable has been invalidated, which is what the x-server
>> patches do.
>>
>> I'd also think you will need both patch sets.
>
> Back buffers are private so a swap for one drawable doesn't need to
> invalidate them for other drawables.
>

Are you sure this is also the case even when kms page flipping is  
used for fullscreen drawables?

The workaround i implemented in my toolkit for the page flipping  
problem when using fullscreen drawables on current x servers was to  
make sure that it always ends a session with an even number of  
completed page-flipping swaps, by checking 'sbc' and issuing an extra  
swap before closing its window if the sbc wasn't an even number. This  
makes sure that the same buffer objects are assigned as front- and  
backbuffer at the time the window closes as when the application  
started and opened its fullscreen window. This fixed any desktop  
corruption i'd usually get when running compiz with non-redirected  
fullscreen windows after quitting my application.

I could be totally wrong, but at least the symptoms and the working  
workaround suggested fullscreen drawables do share their back buffers  
when page flipping is on.

-mario

> -- 
> Ville Syrjälä
> syrjala at sci.fi
> http://www.sci.fi/~syrjala/



More information about the xorg-devel mailing list