Bug 13866 - nouveau gives Xvideo tearing
Summary: nouveau gives Xvideo tearing
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: 7.3 (2007.09)
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-30 11:19 UTC by Pierre Ossman
Modified: 2008-01-20 10:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Pierre Ossman 2007-12-30 11:19:08 UTC
Enabling RandR 1.2 gives me a lot of video tearing on my Geforce 7300 GT. It doesn't matter if two outputs are enabled or not, simply using the new RandR 1.2 stuff produces the problem.
Comment 1 Pierre Ossman 2008-01-03 12:57:48 UTC
I've tested things a bit further. RandR 1.2 is not needed to produce the problem, but having two output enabled worsens the problem.

Things work fine with the nv driver, so you do not need to compare with the closed one.

I've confirmed that all three test cases (nv, nouveau "normal", nouveau "randr") use the same mode line. The RandR code path selects a different one by default, but I switched it to get a valid comparison.

This card does not have any overlay, so it's the blitter that's involved.
Comment 2 Maarten Maathuis 2008-01-03 14:57:41 UTC
I think you're using the texture adapter, which doesn't have sync to vblank yet (it still has to be reverse engineered). But can you confirm that the tearing is diaginal? And that xvinfo shows the texture adapter first?
Comment 3 Pierre Ossman 2008-01-03 22:32:05 UTC
The tearing is horisontal, not diagonal. But the texture adaptor is indeed first in xvinfo.

But I believe I'm using the blitter. The driver does syncing, it just fails ever so slightly. :)

If I disable XV_SYNC_TO_VBLANK, things go south really badly. Keeping it on, it is almost in sync but with constant, slight glitches. I've been trying to put together a simple test case but it has proven to be very difficult. So far I can only reproduce it consistently with mplayer.
Comment 4 Pierre Ossman 2008-01-05 01:55:07 UTC
Ah, I see what is happening now, and you were right.

mplayer, where I'm seeing the tearing, uses the first port found. But my tests were using the last port. So one used the texture adapter, and one the blitter. If I change my tests to use the texture adapter, the problem is apparent. It also explains why nv works as it doesn't have the texture adapter.

So I have a couple of questions:

1. What's the difference between the two? Judging from the names I'd guess the texture adapter uses the 3D engine and the blitter the 2D engine.

2. Why two? I.e. why is the blitter insufficient?

3. Why is the texture adapter the first (and therefore picked by programs) if it is inferior to the blitter when it comes to displaying video?

4. Why does vsync need rev.eng.? I tested adding a simple FIRE_RING()/NVWaitVSync() and it removed the tearing.
Comment 5 Maarten Maathuis 2008-01-05 03:27:44 UTC
1. Indeed.
2. The blitter doesn't support YV12 which is a very common color space.
3. It gives people reason to improve it ;-) (also defaults get better feedback)
4. This does not work well for me and many others. It is believed that the 3d engine has it's own sync.
Comment 6 Pierre Ossman 2008-01-05 11:30:50 UTC
For the time being, could we get an config option that reverses the order of the ports? Or disables the texture adapter? :)
Comment 7 Arthur Huillet 2008-01-20 06:32:40 UTC
Hello,

is this still an issue?
Comment 8 Maarten Maathuis 2008-01-20 08:17:54 UTC
Can you please retry with current git. Please keep in mind that the composited case may not be perfect, but it should improve.
Comment 9 Maarten Maathuis 2008-01-20 10:08:30 UTC
I removed the potentionally problematic workaround for composite situations, please make sure you try without composite.
Comment 10 Pierre Ossman 2008-01-20 10:40:58 UTC
The latest additions correctly vsyncs for the texture adapter on both CRTCs here. Closing bug.


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.