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] systeminformation
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: Mesa: (9.1)f00ae9c773dc944f0d900ef5c50c3b417ad95e84 Xserver: (server-1.13-branch)xorg-server-1.13.4 Xf86_video_intel:(master)2.21.7-5-g87295b1ef85505689ce326137c2794230fb3f35f Cairo:(master)631bf299256e11a17511977f357e0353fb5615f7 Libva_intel_driver:(master)31caada2967b94705d78ab7f6d07965ad7f13d42 Kernel:(drm-intel-fixes) 3598706b52cb45ba0a9e8aa99ce5ac59140f2b8b Os: Fedora17
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.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/issues/9.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.