[Bug 42035] no way to turn off vsync
Michal Suchanek
hramrach at centrum.cz
Thu Oct 27 09:00:12 PDT 2011
2011/10/27 Michel Dänzer <michel at daenzer.net>:
> On Mit, 2011-10-26 at 21:36 +0200, Michal Suchanek wrote:
>>
>> Ideally I would like no tearing and no vblank sync
>
> Well, the only way to avoid tearing without sync to vblank is the method
> controlled by Option "SwapbuffersWait"...
>
>
>> but both tearing prevention in the radeon driver and sync to vblank
>> can lead to applications getting stuck in the X server.
>
> Please provide details about a specific scenario where this happens with
> vblank_mode=0.
Remove all configuration pertaining to vsync/vline wait.
Run recent radeon driver on 3.0.0-10 Ubuntu kernel.
Run glxgears. They won't render even a single frame unless the screen
is rotated.
>
>> So the practical difference is minimal since most GL rendering would
>> occur in large windows.
>
> The main difference is that sync to vblank waits for CPU interrupts,
> whereas the vline waits happen in the GPU command processor.
And the vline waits fail non-deterministically while the cpu
interrupts fail deterministically.
Interrupts might add some overhead but since they are likely firing
anyway there is little gain in avoiding use of them I guess.
And since vline waits are not configurable unless you are willing to
start a separate X server for each application they not very usable.
>
>
>> In the more recent snapshot the tearing prevention is not working
>> which is probably a bug in itself.
>
> Define 'not working'.
fullscreen glxgears fps are not capped to the screen refresh rate.
2011/10/27 Michel Dänzer <michel at daenzer.net>:
> On Don, 2011-10-27 at 01:14 +0200, Michal Suchanek wrote:
>>
>> The primary screen is not rotated, the secondary is.
>
> In the future, please mention 'details' like that up front. Rotation
> makes things quite a bit more complicated.
It affects the synchronization only under very specific circumstances
so it did not seem that important.
It should probably work more consistently one way or another.
>
>
>> Window last mapped on primary screen (or the secondary when I turn off
>> rotation) keeps capped by the screen refresh rate when unmapped.
>
> radeon_dri2_drawable_crtc() only looks at the window position, not at
> whether it's currently mapped. We could change it to return -1 for
> unmapped windows, in which case they should run uncapped. But I'm not
> sure that would be better — it doesn't really make sense to waste
> resources rendering more frames that won't be visible anyway? Opinions?
It's definitely a waste but then the application should handle its
window unmapping, not the X server I guess.
And synchronization does not make much sense for invisible windows.
I don't particularly care one way or another so long as stuff works properly.
>
>
>> Window last mapped on rotated screen is not capped when unmapped.
>
> That's not with vblank_mode=0, is it?
That's with no configuration whatsoever.
>
> The difference appears to be due to radeon_dri2_drawable_crtc()
> returning -1 for rotated CRTCs, so all sync to vblank functionality is
> skipped for those.
>
Why that matters only when the window is not mapped?
Thanks
Michal
More information about the xorg-driver-ati
mailing list