I have noticed since I use SNA that partial screen updates have sometimes tearing.
For example when moving windows, or in videos that are displayed in a window.
I think Chris Wilson was talking about that with Dave Airlie but I don't remember what was the conclusion.
With UXA there was no tearing visible.
Created attachment 49553 [details]
It's a bone of contention in that the specification does not state whether those updates should or should not be synchronous with screen updates and the dri2 code calls the same function from a code path that is supposed to be asynchronous. The change is trivial and if the xserver patches ever land then there is no confusion either...
Which xserver patches?
@Tomas - I believe Chris was talking about patches in http://cgit.freedesktop.org/~ickle/xserver/log/. Could you try them out please?
Once you have the async vblank hook, you can then make DRI2CopyRegion synchronous (changing the sna_dri_copy_region function to pass true instead of false).
(In other words - apply the patch at http://cgit.freedesktop.org/~eugeni/xf86-video-intel/commit/?id=4e78dfc6b8c26312922e63002c423fb6637de472 after Chris' patches).
No changes here with changing sna_dri_copy_region function to true though, tearing still occurs when moving windows around.
Are you absolutely sure at this point? I'm tempted to say turn on debugging again and verify for yourself that the scanline waits are inserted into the batch just before the dri copy. The only platform where it won't work is SNB, as we just have no clue yet how to make it work.
Just wondering of those xserver patches have finally landed somewhere or they are still MIA.
I've got a couple more reviews this time around...
For what is worth, i've serious tearing in kde if opengl compositing is enabled when i use sna.
No matter if i force vsync in kwin and/or via .drirc.
chipset is 945gm
The bug can't be reproduced on my side. Our test environment as following:
This bug stems from the broken design of DRI2. Nothing can be done without revving the protocol.
It should be noted that at the current time DRI3/Present does not fix this problem.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.