On Thu, Dec 20, 2012 at 3:53 PM, Albrecht Dreß <[email protected]> wrote: > Hi Alex! > > Thanks a lot for the fast response! > > Am 20.12.12 20:44 schrieb(en) Alex Deucher: > >> With KMS the display setup is handled by the kernel now, so the MacModel >> option has been replaced with a kernel module parameter. > > > I see. Makes sense... > > >> Specify radeon.connector_table=x where x = > > > Hmmm, is there a documentation somewhere for these parameters? At least for > 3.7.1, I don't find it in the kernel docs.
Not at the moment. Most models are autodetected and we add new models when people report problems. > > >> However, it would be better to add a proper table for your specific model >> so that you won't have to force some table. Please send me the output of >> lspci -vnn and the output of /proc/cpuinfo and I can prepare a patch for you >> to try. > > > Here we go: > > root@antares:~# lspci -vnn -s 0000:00:10.0 > 0000:00:10.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] > nee ATI RV200 QW [Radeon 7500] [1002:5157] (prog-if 00 [VGA controller]) > Subsystem: Advanced Micro Devices [AMD] nee ATI RV200 QW [Radeon > 7500] [1002:5157] > Flags: bus master, stepping, 66MHz, medium devsel, latency 255, IRQ > 48 > Memory at 98000000 (32-bit, prefetchable) [size=128M] > I/O ports at 0400 [size=256] > Memory at 90000000 (32-bit, non-prefetchable) [size=64K] > Expansion ROM at 90020000 [size=128K] > Capabilities: [58] AGP version 2.0 > Capabilities: [50] Power Management version 2 > Kernel driver in use: radeonfb > Kernel modules: radeon > > (I know I have to disable the radeonfb driver for the Xorg one to work, but > I need *some* display output... ;-) > > Please note that the Radeon card is an add-on card in the AGP slot. I > *think* Apple shipped all PowerMac3,5 boxes with this card, but I'm not > sure. Some time ago, I tested it with a different AGP (nvidia?) and a PCI > card, which both worked fine on Linux, but they were not detected by Mac OS > X Tiger. PC radeon cards have a rom on them which contains data tables with details about the card (connectors, ddc lines, etc), etc. Apple cards have a proprietary rom without that information so we need to hard code it in the driver. > > root@antares:~# cat /proc/cpuinfo > processor : 0 > cpu : 7450, altivec supported > clock : 799.999998MHz > revision : 2.1 (pvr 8000 0201) > bogomips : 66.43 > timebase : 33217800 > platform : PowerMac > model : PowerMac3,5 > machine : PowerMac3,5 > motherboard : PowerMac3,5 MacRISC2 MacRISC Power Macintosh > detected as : 69 (PowerMac G4 Silver) > pmac flags : 00000010 > L2 cache : 256K unified > pmac-generation : NewWorld > Memory : 1024 MB > > Btw, if I understand the code in > radeon_get_legacy_connector_info_from_table() correctly, CT_MINI_INTERNAL > doesn't look like the *really* correct option. My card doesn't have a TV > output, but an analogue vga (in addition to the adc which has both digital > and analogue signals). ADC is basically an apple proprietary DVI-I port. We add the tv-output because IIRC Apple sells a ADC to TV adapter. MINI_INTERNAL is not the correct option, it just happens to work better than the default connector table. I'll attaching a patch to test. It would be great if you could test both connectors to make sure I got the ddc lines mapped correctly (make sure you can get an edid from the monitor). The hardest part is getting the ddc line mapping correct. I've included several options in the patch for each connector, e.g., + /* DVI-I - tv dac, int tmds */ + ddc_i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); and + /* VGA - primary dac */ + ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); comment or uncomment lines to try different ddc line mappings until you find which line is mapped to which connector. Let me know how it goes and I'll get the patch pushed upstream. Alex > > Thanks a lot, > Albrecht.
From 36bebeb63472eca115f70a80ed016da7dfba948f Mon Sep 17 00:00:00 2001 From: Alex Deucher <[email protected]> Date: Thu, 20 Dec 2012 16:35:47 -0500 Subject: [PATCH] drm/radeon: add connector table for Mac G4 Silver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apple cards do not provide data tables in the vbios so we have to hard code the connector parameters in the driver. Reported-by: Albrecht Dreß <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] --- drivers/gpu/drm/radeon/radeon_combios.c | 57 +++++++++++++++++++++++++++++++ drivers/gpu/drm/radeon/radeon_mode.h | 3 +- 2 files changed, 59 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index 4af8912..d540987 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c @@ -1548,6 +1548,9 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) of_machine_is_compatible("PowerBook6,7")) { /* ibook */ rdev->mode_info.connector_table = CT_IBOOK; + } else if (of_machine_is_compatible("PowerMac3,5")) { + /* PowerMac G4 Silver radeon 7500 */ + rdev->mode_info.connector_table = CT_MAC_G4_SILVER; } else if (of_machine_is_compatible("PowerMac4,4")) { /* emac */ rdev->mode_info.connector_table = CT_EMAC; @@ -2212,6 +2215,60 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) CONNECTOR_OBJECT_ID_SVIDEO, &hpd); break; + case CT_MAC_G4_SILVER: + DRM_INFO("Connector Table: %d (mac g4 silver)\n", + rdev->mode_info.connector_table); + /* DVI-I - tv dac, int tmds */ + ddc_i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); + hpd.hpd = RADEON_HPD_1; /* ??? */ + radeon_add_legacy_encoder(dev, + radeon_get_encoder_enum(dev, + ATOM_DEVICE_DFP1_SUPPORT, + 0), + ATOM_DEVICE_DFP1_SUPPORT); + radeon_add_legacy_encoder(dev, + radeon_get_encoder_enum(dev, + ATOM_DEVICE_CRT2_SUPPORT, + 2), + ATOM_DEVICE_CRT2_SUPPORT); + radeon_add_legacy_connector(dev, 0, + ATOM_DEVICE_DFP1_SUPPORT | + ATOM_DEVICE_CRT2_SUPPORT, + DRM_MODE_CONNECTOR_DVII, &ddc_i2c, + CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I, + &hpd); + /* VGA - primary dac */ + ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); + //ddc_i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); + hpd.hpd = RADEON_HPD_NONE; + radeon_add_legacy_encoder(dev, + radeon_get_encoder_enum(dev, + ATOM_DEVICE_CRT1_SUPPORT, + 1), + ATOM_DEVICE_CRT1_SUPPORT); + radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT1_SUPPORT, + DRM_MODE_CONNECTOR_VGA, &ddc_i2c, + CONNECTOR_OBJECT_ID_VGA, + &hpd); + /* TV - TV DAC */ + ddc_i2c.valid = false; + hpd.hpd = RADEON_HPD_NONE; + radeon_add_legacy_encoder(dev, + radeon_get_encoder_enum(dev, + ATOM_DEVICE_TV1_SUPPORT, + 2), + ATOM_DEVICE_TV1_SUPPORT); + radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, + DRM_MODE_CONNECTOR_SVIDEO, + &ddc_i2c, + CONNECTOR_OBJECT_ID_SVIDEO, + &hpd); + break; default: DRM_INFO("Connector table: %d (invalid)\n", rdev->mode_info.connector_table); diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index d818b50..ed8a0fa 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -209,7 +209,8 @@ enum radeon_connector_table { CT_RN50_POWER, CT_MAC_X800, CT_MAC_G5_9600, - CT_SAM440EP + CT_SAM440EP, + CT_MAC_G4_SILVER }; enum radeon_dvo_chip { -- 1.7.7.5
_______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
