Bug 5623

Summary: radeon driver incorrectly detects second monitor, causing single monitor to be treated as secondary (Xv overlay not visible by default, MergedFB active when it shouldn't be...)
Product: xorg Reporter: Jacek Poplawski <jacekpoplawski>
Component: Driver/RadeonAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high CC: alexdeucher, benh, felipe.contreras, kiltharan, MasterJediYoda, sa
Version: 7.2 (2007.02)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xorg.conf, no xv with this configuration
none
Log file, no xv
none
Logfile, MonitorLayout CRT NONE none

Description Jacek Poplawski 2006-01-17 05:37:44 UTC
After upgrade from 6.8.2 (and 6.9pre) to 6.9.0 / 7.0.0 - XVideo stopped working.

When I start mplayer or xine with "xv" driver I see only empty window.
In Depth 16 this window is light blue in Depth 24 it is dark blue.

My video card is Radeon 9100 (r200), I use radeon driver. One person with Radeon
9600 (r300) confirmed this problem on forum
(http://bbs.archlinux.org/viewtopic.php?t=17430&start=45).

I tried to enable EXA, enable DGA, disable DRI, change Depth, disable
DMA for Xv, enable Composite. No change. 

I've tested xorg-6.9.0 compiled from source in SUSE 10.0 and xorg-7.0.0
installed from binary packages in ArchLinux.

my conf:
http://jpopl.w.interia.pl/xorg.conf

log:
http://jpopl.w.interia.pl/Xorg.0.log

output of xvinfo:
http://jpopl.w.interia.pl/xvinfo.txt

output of mplayer:
http://jpopl.w.interia.pl/mplayer.txt

dmesg:
http://jpopl.w.interia.pl/dmesg.txt

cpuinfo:
http://jpopl.w.interia.pl/cpuinfo.txt
Comment 1 Jacek Poplawski 2006-01-25 11:01:34 UTC
I found good version!
I was compiling different versions of xf86-driver-ati from CVS, and now I tried
version from date: 2005-08-01 - with that driver I have XVideo working!
Now I just need to find exact date of change and compare the sources :)
Comment 2 Jacek Poplawski 2006-01-25 11:41:17 UTC
Version from 2005-08-25 works correctly, version from 2005-08-26 is broken.

Two files changed that day:
driver/xf86-video-ati/src/radeon_bios.c
driver/xf86-video-ati/src/radeon_mm_i2c.c
Comment 3 Jacek Poplawski 2006-01-26 06:48:39 UTC
I found the difference, and applied it against current CVS - and it works!

Proposed patch:

diff -Naur new/radeon_bios.c old/radeon_bios.c
--- new/radeon_bios.c   2006-01-25 20:30:02.000000000 +0100
+++ old/radeon_bios.c   2006-01-25 20:30:22.000000000 +0100
@@ -216,8 +216,7 @@
        if ((tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x50))) {
            for (i = 1; i < 4; i++) {

-               if (!RADEON_BIOS16(tmp + i*2))
-                       break; /* end of table */
+               if (!RADEON_BIOS8(tmp + i*2) && i > 1) break; /* end of table */

                tmp0 = RADEON_BIOS16(tmp + i*2);
                if (((tmp0 >> 12) & 0x0f) == 0) continue;     /* no connector */

 
Comment 4 Benjamin Herrenschmidt 2006-01-26 09:12:11 UTC
No, the patch is wrong, it reverts a fix that fixed monitor detection on a wide
range of machines. I odn't know what's up with Xv, I suspect it may be hitting
the wrong CRTC. I need more infos to track this one down:

 - What connector does your card have and what kind of monitor is plugged on
each of them

 - I need the X log from both working and non working versions

 - I need you to try switching the Xv CRTC with xvattr and attribute
XV_SWITCH_CRT and let me know if that helps

Thanks
Comment 5 Alex Deucher 2006-01-26 11:26:25 UTC
so it appears to be a crtc mapping issue since XV_SWITCH_CRT fixes the problem
(http://lists.freedesktop.org/archives/xorg/2006-January/012534.html). perhaps
the DDC lines are reversed on this card.
Comment 6 Jacek Poplawski 2006-01-26 19:04:19 UTC
Standard CRT monitor with standard VGA output, and yes - switching XV_SWITCH_CRT
helps.

Marketing name of this card is "Sapphire Radeon 9100", but in the following
thread you can read about person with Radeon 9600 and same problem:

http://bbs.archlinux.org/viewtopic.php?t=18112
Comment 7 Michel Dänzer 2006-03-07 03:54:09 UTC
See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=353367 .
Comment 8 Michel Dänzer 2006-04-13 17:53:41 UTC
*** Bug 2759 has been marked as a duplicate of this bug. ***
Comment 9 Timo Jyrinki 2006-04-30 21:34:17 UTC
See also bug 6796 for a PCI-E x800 user who has this problem. Fixed with Option
"MonitorLayout" "TMDS,NONE".
Comment 10 Timo Jyrinki 2006-12-29 08:35:04 UTC
Changed summary (affects more than just specific range of cards), and version
(still happens on 7.2). Also bug 5991 ("Wrong resolution when connecting an ati
X800 PCIe via DVI") is related to monitor detection problems.
Comment 11 Timo Jyrinki 2007-02-01 11:45:51 UTC
I retract my words that bug 6796 describes a configuration with similar problem - at least it's not doing that anymore. On that configuration, there's no problem nowadays, the only problem happens when both DVI and VGA is used. Bug 5991 is closer to that.

It might be that this bug is also fixed, because my original problem (or the second one of those, later separated to be related to this bug while the other part continued to live in 6796 and was finally fixed) is not there anymore. Back then, also using just DVI or DVI+TV-Out showed the problem, now they are both working fine with full resolution.

All in all, could you check this out with the latest GIT driver, Jacek?
Comment 12 Marcin Kurek 2007-02-22 16:13:56 UTC
I have same problem here with new R 9100 DVI/TV. First of all my old Radeon 9000 DVI/VIVO detects my monitor correctly via DDC (SyncMaster 710N) but on 9100 iv got to add monitor V/H sunc to xorg.conf to see normal 1280x1024 resolution.

The all xv apps like mplayer shows me only black window and it seems Option "MonitorLayout" "CRT, NONE" fix this one for me.

Tested with recent git snap of coz.
Comment 13 Jacek Poplawski 2007-02-22 16:34:49 UTC
I am sorry, I can't check 9100 anymore, I switched to Radeon 9800 Pro (which is r300) some time ago.
Comment 14 Timo Jyrinki 2007-02-23 04:36:16 UTC
*** Bug 8229 has been marked as a duplicate of this bug. ***
Comment 15 Daniel Stone 2007-02-27 01:30:02 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 16 Sven Arvidsson 2007-03-29 04:23:17 UTC
I'm having the same problem with a Radeon 9100. This card has VGA, S-Video and a DVI port. I have a TFT monitor connected to the VGA port. I'm not getting Xv, but setting XV_SWITCHCRT or specifying "MonitorLayout" "CRT, NONE" as a work around works. 

01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R200 QM [Radeon 9100]

I'm attaching my xorg.conf and log files from when Xv does not work, and when I use "MonitorLayout" "CRT, NONE".
Comment 17 Sven Arvidsson 2007-03-29 04:23:57 UTC
Created attachment 9347 [details]
xorg.conf, no xv with this configuration
Comment 18 Sven Arvidsson 2007-03-29 04:24:32 UTC
Created attachment 9348 [details]
Log file, no xv
Comment 19 Sven Arvidsson 2007-03-29 04:25:02 UTC
Created attachment 9349 [details]
Logfile, MonitorLayout CRT NONE
Comment 20 Alex Deucher 2007-08-31 07:18:25 UTC
this should be fixed in ati git master.  please reopen if you still have problems.

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.