Video tearing on Sandybridge
Hello,
I'm running vaapi-mplayer on debian wheezy, which has fairly up-to-date intel drivers. (Right now i965-va-driver is outdated, so I use the sid package of that.)
I do not have any window manager, only X and an xterm. (Really, not even twm. It is only a test installation.)
Both output via OpenGL and VA-API play fine if there is only one active screen, or two screens which display the same picture (clone mode).
If, however, two screens are next to or on top of each other, playing video on one of the screens can show some tearing. It is not always seen with normal video, a special test pattern is helpful. Also, it does only tear in one out of ten tries, you can hit pause again and again, sooner or later the tearing will appear, and disappear again after the next pause/unpause cycle. While the tearing is there, it stays at about the same height of the video until the next pause/unpause cycle. Most times it is seen in the top third of the video. It does not matter if the video is fullscreen or not.
One screen is 1440x900 via DVI, the other is 1920x1080 via HDMI. Both screens run 60Hz, my test video is 30fps and full 1920x1080.
Is it likely that this is a bug, or am I doing something wrong?
Thank you all!
Greets,
Kiste
On Sat, 31 Mar 2012 19:52:09 +0200, Oliver Seitz <[email protected]> wrote:
[snip]
Quoted 11 lines
If, however, two screens are next to or on top of each other, playing video on one of the screens can show some tearing. It is not always seen with normal video, a special test pattern is helpful. Also, it does only tear in one out of ten tries, you can hit pause again and again, sooner or later the tearing will appear, and disappear again after the next pause/unpause cycle. While the tearing is there, it stays at about the same height of the video until the next pause/unpause cycle. Most times it is seen in the top third of the video. It does not matter if the video is fullscreen or not.
Is it likely that this is a bug, or am I doing something wrong?
Video tearing in windows is a known issue on SandyBridge as they removed the commands to perform vsync'ed updates and hid the logic behind a baffling sequence of registers that we have not yet got working.
The only workaround is to force pageflipping (ie exchange the whole scanout for each frame) either by using a compositing WM (and hoping for the best) or to only use fullscreen DRI video applications (OpenGL or libva decoders) that use SwapBuffers.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 3 lines
The only workaround is [...] to only use fullscreen DRI video applications (OpenGL or libva decoders) that use SwapBuffers.
Yes, works perfectly while only one screen is connected. That means, this definition of "fullscreen" is "the whole framebuffer", and not "the content of one display"? This would in some way explain why tearing can not be reliably prevented while more than one screen is active.
Thanks for the explanations!
Greets,
Kiste
Quoted 11 lines · Oliver Seitz
Quoted 5 lines
The only workaround is [...] to only use fullscreen DRI video applications
(OpenGL or libva decoders) that use SwapBuffers.
Yes, works perfectly while only one screen is connected. That means, this definition of "fullscreen" is "the whole framebuffer", and not "the content of one display"? This would in some way explain why tearing can not be reliably prevented while more than one screen is active.
Well, currently X has one framebuffer spanning all xrandr screens. Which means we can't pageflip just one (it would show garbage on the other screen). The fix would be to use per-crtc framebuffers for X, which requires a decent rewrite of many things in X.
Yet again something else that Wayland gets right from the start ;-) -Daniel
Signature · 2 lines
Daniel Vetter [email protected] - +41 (0) 79 364 57 48 - http://blog.ffwll.ch
Quoted 2 lines
Video tearing in windows is a known issue on SandyBridge
And also on IvyBridge, I presume. Then I'll try to be patient until there's a new implementation of vsynced update logic in the driver :-)
Thanks for the explanations and all the good work!
Kiste
Quoted 7 lines · Oliver Seitz
Video tearing in windows is a known issue on SandyBridge
Quoted 1 line
And also on IvyBridge, I presume. Then I'll try to be patient until there's a new implementation of vsynced update logic in the driver :-)
There are some improvements on the next one after that though :).
But the real fix for SNB/IVB depends on the DERRMR implementation which we could not get to work without nasty side effects on Sandy Bridge yet (such as hangs). Jesse has sent something in this sense for Ivy Bridge in his '[Intel-gfx] Scanline wait hack for IVB' patch, so hope is not lost yet.
There is a huge thread about this on the
https://bugs.freedesktop.org/show_bug.cgi?id=37686 bug as well.
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx