Bug 6003 - xorg problems radeon x600 new imac 12,1
Summary: xorg problems radeon x600 new imac 12,1
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: 7.0.0
Hardware: PowerPC Linux (All)
: high major
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 00:56 UTC by Clemens Heese
Modified: 2007-12-04 14:11 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg log with radeon (36.95 KB, text/plain)
2006-02-23 00:58 UTC, Clemens Heese
no flags Details
xorg.conf (1.17 KB, text/plain)
2007-12-02 06:05 UTC, Étienne Bersac
no flags Details
Xorg log (50.92 KB, text/plain)
2007-12-02 06:05 UTC, Étienne Bersac
no flags Details
Xrandr 1.2 output (319 bytes, text/plain)
2007-12-02 06:08 UTC, Étienne Bersac
no flags Details
ddcprobe output (289 bytes, text/plain)
2007-12-02 06:09 UTC, Étienne Bersac
no flags Details
parse-edid output on internal display (570 bytes, text/plain)
2007-12-02 06:09 UTC, Étienne Bersac
no flags Details
/proc/device-tree entries for the two outputs (1.34 KB, application/x-bzip)
2007-12-04 10:40 UTC, Étienne Bersac
no flags Details

Description Clemens Heese 2006-02-23 00:56:55 UTC
i own a imac g5 isight (i think powermac 12,1) with radeon x600 pcie, kernel 2.6.16-r4.
after compiling xorg 6.8, 6.9 or even 7.0 that compiled without errors, only the fbdev driver of xorg 
worked.
worked is not the right word, because only every coloum line was displayed (really not usable).
now i started xorg with the radeon driver and my screen just got black und the whole system totally 
freezes.
i posted the logs to the gentoo forum (URL...)
Comment 1 Clemens Heese 2006-02-23 00:58:30 UTC
Created attachment 4724 [details]
xorg log with radeon
Comment 2 Clemens Heese 2006-02-28 02:48:18 UTC
X Window System Version 7.0.0 
Release Date: 21 December 2005 
X Protocol Version 11, Revision 0, Release 7.0 
Build Operating System:Linux 2.6.16-rc4 ppc64 
Current Operating System: Linux clemens-imac 2.6.16-rc4 #2 SMP Tue Feb 21 
15:08:10 GMT 2006 ppc64 
Build Date: 21 February 2006 
        Before reporting problems, check http://wiki.x.org 
        to make sure that you have the latest version. 
Module Loader present 
Markers: (--) probed, (**) from config file, (==) default setting, 
        (++) from command line, (!!) notice, (II) informational, 
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown. 
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Feb 27 15:46:22 2006 
(==) Using config file: "/etc/X11/xorg.conf" 
 
(WW) ****INVALID IO ALLOCATION**** b: 0xf4000400 e: 0xf40004ff correcting 
expected keysym, got dead_diaresis: line 143 of pc/de 
The XKEYBOARD keymap compiler (xkbcomp) reports: 
> Error:            No Symbols named "de" in the include file "pc/de" 
>                   Exiting 
>                   Abandoning symbols file "default" 
Errors from xkbcomp are not fatal to the X server 
Could not init font path element /usr/share/fonts/local/, removing from list! 
twm:  unable to open fontset 
"-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" 
 
Comment 3 Erik Andren 2006-07-28 09:44:11 UTC
Are you still experiencing this with the 7.1 Xorg release?
Comment 4 Daniel Stone 2007-02-27 01:30:36 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 5 Étienne Bersac 2007-12-01 10:56:39 UTC
Hi,

I also own an iMac G5 with a radeon X600 XT Pro (rv380). VGA-0 internal display is not detected (like for some Acer Aspire Ferrari laptops). DVI-0 external display is used instead and works quite well. I'm using git version of xf86-video-ati.

Note that i'm currently working on implementing windfarm_pm121 driver for fans control. There is no MacModel for imac, do we need such special case ? (i wish not).

Regards,
Étienne.
Comment 6 Michel Dänzer 2007-12-02 05:51:42 UTC
(In reply to comment #5)
> VGA-0 internal display is not detected [...]

I think you mean LVDS?

> There is no MacModel for imac, do we need such special case ?

Probably.
Comment 7 Étienne Bersac 2007-12-02 06:01:06 UTC
Hi Michel,

I don't know exactly what is LVDS compared to TMDS in this case (a desktop computer with a built-in screen). All i know is that xrandr report that DVI-0 is connected but not VGA-0.

http://support.apple.com/specs/imac/iMac_G5_iSight.html tells that there is a VGA output, so these become very odd : the DVI output is known to be connected, but i have the actual output is send through the VGA output (external screen).

Regards,
Comment 8 Étienne Bersac 2007-12-02 06:05:13 UTC
Created attachment 12900 [details]
xorg.conf
Comment 9 Étienne Bersac 2007-12-02 06:05:49 UTC
Created attachment 12901 [details]
Xorg log
Comment 10 Étienne Bersac 2007-12-02 06:08:13 UTC
Created attachment 12902 [details]
Xrandr 1.2 output
Comment 11 Étienne Bersac 2007-12-02 06:09:17 UTC
Created attachment 12903 [details]
ddcprobe output
Comment 12 Étienne Bersac 2007-12-02 06:09:54 UTC
Created attachment 12904 [details]
parse-edid output on internal display
Comment 13 Étienne Bersac 2007-12-02 06:14:27 UTC
Hi,

> http://support.apple.com/specs/imac/iMac_G5_iSight.html tells that there is a
> VGA output, so these become very odd : the DVI output is known to be connected,
> but i have the actual output is send through the VGA output (external screen).

I didn't tell it right : the specs page tells the external connector is VGA, so the DVI one is the internal. xrandr report DVI-1 (connected) and DVI-0 (disconnected) outputs :/ So the external (mini-) VGA output is treated as DVI-1 :/

Regards,
Étienne
Comment 14 Alex Deucher 2007-12-04 00:34:47 UTC
(In reply to comment #13)
> Hi,
> 
> > http://support.apple.com/specs/imac/iMac_G5_iSight.html tells that there is a
> > VGA output, so these become very odd : the DVI output is known to be connected,
> > but i have the actual output is send through the VGA output (external screen).
> 
> I didn't tell it right : the specs page tells the external connector is VGA, so
> the DVI one is the internal. xrandr report DVI-1 (connected) and DVI-0
> (disconnected) outputs :/ So the external (mini-) VGA output is treated as
> DVI-1 :/

The driver just defaults to a default setup since the driver doesn't know what outputs your system has.  We need to add a macmodel entry for the isight.  The tough part is figuring out which outputs are used and which ddc channels map to which outputs.  Also, we need to find out whether it uses TMDS (internal or external) or LVDS for the internal panel.  If it uses LVDS, the driver will need some changes as we don't currently support LVDS on non-mobility chips.  Also, ifs tv-out a direct plug or a special adapter for the vga port?  To start you'll have to play with the "ConnectorTable" option.

Try these to start:

LVDS:
Option "ConnectorTable" "1,2,2,1,2,1,2,2"
internal TMDS:
Option "ConnectorTable" "1,2,0,4,2,1,2,2"
external TMDS:
Option "ConnectorTable" "1,2,1,4,2,1,2,2"

for the LVDS option, you'll also have to remove the info->IsMobility check from RADEONRestoreLVDSRegisters().

Comment 15 Étienne Bersac 2007-12-04 10:22:34 UTC
Hi,

Each of the ConnectorTable value you sent changes only one thing : the screen has the right resolution (internal APP 1680x1050) but displayed on the wrong device (the external PHL 1280x1024). I don't find any ConnectorTable documentation. I would like to play a bit with it.

I implemented the windfarm-pm121 driver so the fans are now silent. I'd be happy to fix the radeon driver to get this machine well working (and i'm not afraid of some lines of C :D). Is there some IRC chan where i can ask for help for writing the imac-g5-isight MacModel ?

Regards,
Étienne.
Comment 16 Étienne Bersac 2007-12-04 10:29:45 UTC
Hi,

Seems there is a bug in src/radeon.h : 

#if defined(__powerpc__)                                                                                                                                     
typedef enum {                                                                                                                                               
       RADEON_MAC_IBOOK              = 0x00000001,                                                                                                           
       RADEON_MAC_POWERBOOK_EXTERNAL = 0x00000002,                                                                                                           
       RADEON_MAC_POWERBOOK_INTERNAL = 0x00000004,                                                                                                           
       RADEON_MAC_POWERBOOK_VGA      = 0x00000008,                                                                                                           
       RADEON_MAC_MINI_EXTERNAL      = 0x00000016,                                                                                                           
       RADEON_MAC_MINI_INTERNAL      = 0x00000032,                                                                                                           
} RADEONMacModel;                                                                                                                                            
#endif

I don't understand why the values "seems" decimal power of 2, while there are declared as hexadecimal.

This should be either : 


#if defined(__powerpc__)                                                                                                                                     
typedef enum {                                                                                                                                               
       RADEON_MAC_IBOOK              = 00000001,                                                                                                           
       RADEON_MAC_POWERBOOK_EXTERNAL = 00000002,                                                                                                           
       RADEON_MAC_POWERBOOK_INTERNAL = 00000004,                                                                                                           
       RADEON_MAC_POWERBOOK_VGA      = 00000008,                                                                                                           
       RADEON_MAC_MINI_EXTERNAL      = 00000016,                                                                                                           
       RADEON_MAC_MINI_INTERNAL      = 00000032,                                                                                                           
} RADEONMacModel;                                                                                                                                            
#endif

OR


#if defined(__powerpc__)                                                                                                                                     
typedef enum {                                                                                                                                               
       RADEON_MAC_IBOOK              = 0x00000001,                                                                                                           
       RADEON_MAC_POWERBOOK_EXTERNAL = 0x00000002,                                                                                                           
       RADEON_MAC_POWERBOOK_INTERNAL = 0x00000004,                                                                                                           
       RADEON_MAC_POWERBOOK_VGA      = 0x00000008,                                                                                                           
       RADEON_MAC_MINI_EXTERNAL      = 0x00000010,                                                                                                          
       RADEON_MAC_MINI_INTERNAL      = 0x00000020,                                                                                                           
} RADEONMacModel;                                                                                                               
#endif                             

OR

#if defined(__powerpc__)                                                                                                                                     
typedef enum {                                                                                                                                               
       RADEON_MAC_IBOOK              = 1 << 0,                                                                                                           
       RADEON_MAC_POWERBOOK_EXTERNAL = 1 << 1,                                                                                                           
       RADEON_MAC_POWERBOOK_INTERNAL = 1 << 2,                                                                                                           
       RADEON_MAC_POWERBOOK_VGA      = 1 << 3,                                                                                                           
       RADEON_MAC_MINI_EXTERNAL      = 1 << 4,                                                                                                           
       RADEON_MAC_MINI_INTERNAL      = 1 << 5,                                                                                                           
} RADEONMacModel;                                                                                                                                            
#endif

I may be wrong ! Please explain me.

Étienne.
Comment 17 Étienne Bersac 2007-12-04 10:40:52 UTC
Created attachment 12934 [details]
/proc/device-tree entries for the two outputs

Hi,

Attached an archive containing the device-tree directory for the two output of the card. (Not the entire device-tree !). I wish this will help defining the imac-g5-isight MacModel case.

Étienne.
Comment 18 Alex Deucher 2007-12-04 11:02:22 UTC
(In reply to comment #16)
> Hi,
> 
> Seems there is a bug in src/radeon.h : 
> 
> I may be wrong ! Please explain me.

You're right.  It's a typo in the driver.
Comment 19 Alex Deucher 2007-12-04 11:16:40 UTC
(In reply to comment #15)
> Hi,
> 
> Each of the ConnectorTable value you sent changes only one thing : the screen
> has the right resolution (internal APP 1680x1050) but displayed on the wrong
> device (the external PHL 1280x1024). I don't find any ConnectorTable
> documentation. I would like to play a bit with it.

ConnectorTable defines various components associated with 2 outputs:
DDC line, DAC, TMDS encoder, Connector
See radeon_probe.h for the definitional of these fields.  For example:
Option "ConnectorTable" "1,2,2,1,2,1,2,2"

output 1: 1,2,2,1
DDCType: 1 - DDC_MONID
DACType: 2 - DAC_NONE - no DAC associated with that output
TMDSType: 2 - TMDS_NONE - no TMDS encoder associated with that output
ConnectorType: 1 - CONNECTOR_PROPRIETARY - LVDS connector

output 2: 2,1,2,2
DDCType: 2 - DDC_DVI
DACType: 1 - DAC_TVDAC - TV DAC associated with that output
TMDSType: 2 - TMDS_NONE - no TMDS encoder associated with that output
ConnectorType: 2 - CONNECTOR_CRT - VGA connector
Comment 20 Étienne Bersac 2007-12-04 12:49:33 UTC
Hi Alex,

I played a lot with ConnectorTable option but i'm quite clueless of the real meaning of each available values of each enums. I'm a bit tired of playing with random number :/.

I guess that once i have a correct ConnectorTable, this will be simple to add the MacModel. Does device-tree help ?

Can you explain me each field of the Connector table. e.g. what does mean to change the ConnectorType ?

One time, i got xrandr to output "VGA-0" and "DVI-0", but i don't really understand what it changes except the name (at least, VGA-0 was known as connected while DVI-0 disconnected, not the reverse).

Should i use radeonfb instead of offb ?

Regards,
Étienne.
Comment 21 Benjamin Herrenschmidt 2007-12-04 12:54:21 UTC
Also, I'd suggest that you do your tests without loading radeonfb, just stick to offb until you get X working, then you can re-enable it... just in case there is a conflict. I've heard of strange issues with radeonfb and the iMac's X600
Comment 22 Alex Deucher 2007-12-04 14:11:19 UTC
Fixed in git: 21ed435398e4a398dd8a0a5d7c1d4cc45e916332

please test without any connectortable options and make sure it is detected properly.


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.