Bug 22730 - Xv broken with unified kms/ums driver
Summary: Xv broken with unified kms/ums driver
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 22733 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-12 02:21 UTC by Daniel Vetter
Modified: 2009-07-14 11:46 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
screenshot of visula artifacts as described (989.02 KB, image/png)
2009-07-12 02:36 UTC, Daniel Vetter
no flags Details
my xorg.conf (1.21 KB, text/plain)
2009-07-12 09:33 UTC, Daniel Vetter
no flags Details
Xorg.log after playing some videos with artifacts. (76.52 KB, text/x-log)
2009-07-12 09:34 UTC, Daniel Vetter
no flags Details
xorg.conf (1.17 KB, text/plain)
2009-07-12 11:58 UTC, Mikko C.
no flags Details

Description Daniel Vetter 2009-07-12 02:21:02 UTC
Xv with an output window size above 1440x808 is broken on my machine. Output-pixel-sized small stripes/blocks have completely wrong color/luminance. Smaller sizes work. I didn't check other aspect ratios, yet.

Environment:
libdrm 4179c5f0a69b452cf94a507c13021e4918a3e02d from git
xserver 1.6.1.901-3 from debian unstable
kernel 2.6.31-rc1-00164-g4142ac6 (compiled without kms support)

Hardware:
amd64 with 4G ram
lspci of my radeon (sitting on an amd8xxx agp bridge):

05:00.0 VGA compatible controller [0300]: ATI Technologies Inc RV570 [Radeon X1950 Pro] [1002:7280] (rev 9a)
05:00.1 Display controller [0380]: ATI Technologies Inc RV570 [Radeon X1950 Pro] (secondary) [1002:72a0] (rev 9a)

I'v used git bisect to track this down:

last good: ac4bd24a66c1bdda0293f770a3f891e2b88cc8ee
first bad: d78d50591851d14543f0935d051a59ef29751bbc

I can't nail it further because _all_ of the changesets in between don't compile on my box. I'll add a screenshot so you can see what the visual corruption actually looks like.
Comment 1 Daniel Vetter 2009-07-12 02:36:30 UTC
Created attachment 27606 [details]
screenshot of visula artifacts as described

Further note: Sometimes (changes only when restarting X) I also get a completely different kind of image distoration as the one shown: I then looks like the image is processed by a cheap pop-art filter. Results in crazy colors and heavy posterization.

If you want I could try to capture one of these, too. It just happens less often.
Comment 2 Daniel Vetter 2009-07-12 02:44:14 UTC
Scrap my comment about the output window size. After some more testing I think the distortions start to appear as soon as to upscale factor is >= 2.0 At least that's the only sensible common thing I see.
Comment 3 Alex Deucher 2009-07-12 08:58:34 UTC
Please attach your xorg log and config.
Comment 4 Daniel Vetter 2009-07-12 09:33:56 UTC
Created attachment 27610 [details]
my xorg.conf
Comment 5 Daniel Vetter 2009-07-12 09:34:41 UTC
Created attachment 27611 [details]
Xorg.log after playing some videos with artifacts.
Comment 6 Mikko C. 2009-07-12 11:50:53 UTC
I can confirm everything Daniel said. I also can't compile to bisect any further because I get errors.

For me the corrupted video happens only on full-screen.
My resolution is 1280x800.
Corrupted full screen: http://imagebin.ca/view/yw14iex.html
Ok: http://imagebin.ca/view/1pDGhgw.html

I'm not using KMS, although it's compiled in, just disabled at boot.

My info:

01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon Mobility X1400 [1002:7145] (prog-if 00 [VGA controller])                                                                                                                            
        Subsystem: Dell Device [1028:2003]                                                                                   
        Flags: bus master, fast devsel, latency 0, IRQ 16                                                                    
        Memory at d0000000 (32-bit, prefetchable) [size=256M]                                                                
        I/O ports at ee00 [size=256]                                                                                         
        Memory at efdf0000 (32-bit, non-prefetchable) [size=64K]                                                             
        [virtual] Expansion ROM at efd00000 [disabled] [size=128K]                                                           
        Capabilities: [50] Power Management version 2                                                                        
        Capabilities: [58] Express Legacy Endpoint, MSI 00                                                                   
        Capabilities: [80] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable-                                      
        Kernel modules: radeon
Comment 7 Mikko C. 2009-07-12 11:58:03 UTC
Created attachment 27614 [details]
xorg.conf

Added my xorg.conf

Also I'm using:
- 2.6.31-rc2
- libdrm master
- mesa master
- xorg 1.6.2
Comment 8 Mikko C. 2009-07-13 00:15:13 UTC
In bug #22733 which is most likely the same, the reporter says that the commit that introduced this bug is:
e932836691aeaec37794fdaed2dabb22710fd171 -- radeon: initial preparation for kms
patch.
Comment 9 Mikko C. 2009-07-14 03:12:36 UTC
Compiling xf86-video-ati with "--disable-kms" does *not* fix the issue.
Comment 10 Alex Deucher 2009-07-14 09:42:39 UTC
*** Bug 22733 has been marked as a duplicate of this bug. ***
Comment 11 Alex Deucher 2009-07-14 09:42:52 UTC
looks like a problem with bicubic filtering, probably related to the bicubic bo handling.  disabling bicubic should fix it for now:
xvattr -a XV_BICUBIC -v 0
Comment 12 Alex Deucher 2009-07-14 10:13:24 UTC
fixed with 0485f27bc3d75cb6ab320e8164dbe6ea2713c78e
Comment 13 Daniel Vetter 2009-07-14 10:53:14 UTC
On Tue, Jul 14, 2009 at 10:13:24AM -0700, bugzilla-daemon@freedesktop.org wrote:
> --- Comment #12 from Alex Deucher <agd5f@yahoo.com>  2009-07-14 10:13:24 PST ---
> fixed with 0485f27bc3d75cb6ab320e8164dbe6ea2713c78e
Confirmed - thanks for the speedy fix! Although I've had to apply the
below patch to make it compile (some DRI2 version checks missing?):

-Daniel 

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 4770ba3..43aea0e 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -168,7 +168,7 @@ radeon_dri2_create_buffer(DrawablePtr drawable,
     buffers->pitch = pixmap->devKind;
     buffers->cpp = pixmap->drawable.bitsPerPixel / 8;
     buffers->driverPrivate = privates;
-    buffers->format = format;
+    //buffers->format = format;
     buffers->flags = 0; /* not tiled */
     privates->pixmap = pixmap;
     privates->attachment = attachment;
Comment 14 Alex Deucher 2009-07-14 10:55:04 UTC
> Confirmed - thanks for the speedy fix! Although I've had to apply the
> below patch to make it compile (some DRI2 version checks missing?):
>

depending on what version of the xserver you are building against you may have to change all occurrences of DRI2BufferPtr to DRI2Buffer2Ptr.
Comment 15 Daniel Vetter 2009-07-14 11:46:11 UTC
On Tue, Jul 14, 2009 at 10:55:05AM -0700, bugzilla-daemon@freedesktop.org wrote:
> depending on what version of the xserver you are building against you may have
> to change all occurrences of DRI2BufferPtr to DRI2Buffer2Ptr.
I have 1.6.2 (according to dpkg) a s/DRI2BufferPtr/DRI2Buffer2Ptr/ does
indeed fix the compile problem. Thx.


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.