style cleanup; fixed missing break on i2c disable check... it looks as though i2c was always enabled, even on chips where it was known to be broken. Lets hope this fixes a radeon graphics bug. CID 3234

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40766 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-03-01 19:26:35 +00:00
parent f02c85adba
commit ea76002c38

View File

@ -134,12 +134,12 @@
#define DEVICE_ID_RADEON_3e54 0x3e54 // new #define DEVICE_ID_RADEON_3e54 0x3e54 // new
#define DEVICE_ID_RADEON_3150 0x3150 // new #define DEVICE_ID_RADEON_3150 0x3150 // new
#define DEVICE_ID_RADEON_3154 0x3154 // new #define DEVICE_ID_RADEON_3154 0x3154 // new
#define DEVICE_ID_RADEON_5462 0x5462 // new X600SE on Toshiba M50 really an X300??? #define DEVICE_ID_RADEON_5462 0x5462 // new X600SE on Toshiba M50 an X300???
// rv380 X600AIW // rv380 X600AIW
#define DEVICE_ID_RADEON_5b62 0x5b62 #define DEVICE_ID_RADEON_5b62 0x5b62
// rv410 X700 pro // rv410 X700 pro
#define DEVICE_ID_RADEON_5e48 0x5e48 // new #define DEVICE_ID_RADEON_5e48 0x5e48 // new
#define DEVICE_ID_RADEON_564a 0x564a // new #define DEVICE_ID_RADEON_564a 0x564a // new
#define DEVICE_ID_RADEON_564b 0x564b // new #define DEVICE_ID_RADEON_564b 0x564b // new
@ -245,226 +245,226 @@ typedef struct {
#define STD_RADEON 0 // common as muck PC graphics card (if there is such a thing) #define STD_RADEON 0 // common as muck PC graphics card (if there is such a thing)
#define ISMOBILITY 1 // is mobility #define ISMOBILITY 1 // is mobility
#define INTEGRATED 2 // is IGP (Integrated Graphics Processor) built in to PC mainboard northbridge typically uses system RAM for graphics #define INTEGRATED 2 // is IGP (Integrated Graphics Processor) onboard video
#define MOBILE_IGP ISMOBILITY | INTEGRATED // 2 disabilites for the price of 1 #define MOBILE_IGP ISMOBILITY | INTEGRATED // 2 disabilites for the price of 1
// list of supported devices // list of supported devices
RadeonDevice radeon_device_list[] = { RadeonDevice radeon_device_list[] = {
// original Radeons, now called r100 // original Radeons, now called r100
{ DEVICE_ID_RADEON_QD , rt_r100, STD_RADEON, "Radeon 7200 / Radeon / ALL-IN-WONDER Radeon" }, { DEVICE_ID_RADEON_QD, rt_r100, STD_RADEON, "Radeon 7200 / Radeon / ALL-IN-WONDER Radeon" },
{ DEVICE_ID_RADEON_QE , rt_r100, STD_RADEON, "Radeon QE" }, { DEVICE_ID_RADEON_QE, rt_r100, STD_RADEON, "Radeon QE" },
{ DEVICE_ID_RADEON_QF , rt_r100, STD_RADEON, "Radeon QF" }, { DEVICE_ID_RADEON_QF, rt_r100, STD_RADEON, "Radeon QF" },
{ DEVICE_ID_RADEON_QG , rt_r100, STD_RADEON, "Radeon QG" }, { DEVICE_ID_RADEON_QG, rt_r100, STD_RADEON, "Radeon QG" },
// Radeon VE (low-cost, dual CRT, no TCL), was rt_ve now refered to as rv100 // Radeon VE (low-cost, dual CRT, no TCL), was rt_ve now refered to as rv100
{ DEVICE_ID_RADEON_QY , rt_rv100, STD_RADEON, "Radeon 7000 / Radeon VE" }, { DEVICE_ID_RADEON_QY, rt_rv100, STD_RADEON, "Radeon 7000 / Radeon VE" },
{ DEVICE_ID_RADEON_QZ , rt_rv100, STD_RADEON, "Radeon QZ VE" }, { DEVICE_ID_RADEON_QZ, rt_rv100, STD_RADEON, "Radeon QZ VE" },
{ DEVICE_ID_RN50_515E , rt_rv100, STD_RADEON, "ES1000 515E (PCI)" }, // Evans and Sutherland something or other? { DEVICE_ID_RN50_515E, rt_rv100, STD_RADEON, "ES1000 515E (PCI)" }, // Evans and Sutherland something or other?
{ DEVICE_ID_RN50_5969 , rt_rv100, STD_RADEON, "ES1000 5969 (PCI)" }, { DEVICE_ID_RN50_5969, rt_rv100, STD_RADEON, "ES1000 5969 (PCI)" },
// mobility version of original Radeon (based on VE), now called M6 // mobility version of original Radeon (based on VE), now called M6
{ DEVICE_ID_RADEON_LY , rt_rv100, ISMOBILITY, "Radeon Mobility" }, { DEVICE_ID_RADEON_LY, rt_rv100, ISMOBILITY, "Radeon Mobility" },
{ DEVICE_ID_RADEON_LZ , rt_rv100, ISMOBILITY, "Radeon Mobility M6 LZ" }, { DEVICE_ID_RADEON_LZ, rt_rv100, ISMOBILITY, "Radeon Mobility M6 LZ" },
// RV200 (dual CRT) // RV200 (dual CRT)
{ DEVICE_ID_RADEON_QW , rt_rv200, STD_RADEON, "Radeon 7500 / ALL-IN-WONDER Radeon 7500" }, { DEVICE_ID_RADEON_QW, rt_rv200, STD_RADEON, "Radeon 7500 / ALL-IN-WONDER Radeon 7500" },
{ DEVICE_ID_RADEON_QX , rt_rv200, STD_RADEON, "Radeon 7500 QX" }, { DEVICE_ID_RADEON_QX, rt_rv200, STD_RADEON, "Radeon 7500 QX" },
// M7 (based on RV200) was rt_m7 // M7 (based on RV200) was rt_m 7
{ DEVICE_ID_RADEON_LW , rt_rv200, ISMOBILITY, "Radeon Mobility 7500" }, { DEVICE_ID_RADEON_LW, rt_rv200, ISMOBILITY, "Radeon Mobility 7500" },
{ DEVICE_ID_RADEON_LX , rt_rv200, ISMOBILITY, "Radeon Mobility 7500 GL" }, { DEVICE_ID_RADEON_LX, rt_rv200, ISMOBILITY, "Radeon Mobility 7500 GL" },
// R200 // R200
{ DEVICE_ID_RADEON_QH , rt_r200, STD_RADEON, "Fire GL E1" }, // chip type: fgl8800 { DEVICE_ID_RADEON_QH, rt_r200, STD_RADEON, "Fire GL E1" }, // chip fgl8800
{ DEVICE_ID_RADEON_QI , rt_r200, STD_RADEON, "Radeon 8500 QI" }, { DEVICE_ID_RADEON_QI, rt_r200, STD_RADEON, "Radeon 8500 QI" },
{ DEVICE_ID_RADEON_QJ , rt_r200, STD_RADEON, "Radeon 8500 QJ" }, { DEVICE_ID_RADEON_QJ, rt_r200, STD_RADEON, "Radeon 8500 QJ" },
{ DEVICE_ID_RADEON_QK , rt_r200, STD_RADEON, "Radeon 8500 QK" }, { DEVICE_ID_RADEON_QK, rt_r200, STD_RADEON, "Radeon 8500 QK" },
{ DEVICE_ID_RADEON_QL , rt_r200, STD_RADEON, "Radeon 8500 / 8500LE / ALL-IN-WONDER Radeon 8500" }, { DEVICE_ID_RADEON_QL, rt_r200, STD_RADEON, "Radeon 8500 / 8500LE / ALL-IN-WONDER Radeon 8500" },
{ DEVICE_ID_RADEON_QM , rt_r200, STD_RADEON, "Radeon 9100" }, { DEVICE_ID_RADEON_QM, rt_r200, STD_RADEON, "Radeon 9100" },
{ DEVICE_ID_RADEON_Qh , rt_r200, STD_RADEON, "Radeon 8500 Qh" }, { DEVICE_ID_RADEON_Qh, rt_r200, STD_RADEON, "Radeon 8500 Qh" },
{ DEVICE_ID_RADEON_Qi , rt_r200, STD_RADEON, "Radeon 8500 Qi" }, { DEVICE_ID_RADEON_Qi, rt_r200, STD_RADEON, "Radeon 8500 Qi" },
{ DEVICE_ID_RADEON_Qj , rt_r200, STD_RADEON, "Radeon 8500 Qj" }, { DEVICE_ID_RADEON_Qj, rt_r200, STD_RADEON, "Radeon 8500 Qj" },
{ DEVICE_ID_RADEON_Qk , rt_r200, STD_RADEON, "Radeon 8500 Qk" }, { DEVICE_ID_RADEON_Qk, rt_r200, STD_RADEON, "Radeon 8500 Qk" },
{ DEVICE_ID_RADEON_BB , rt_r200, STD_RADEON, "ALL-IN-Wonder Radeon 8500 DV (BB)" }, { DEVICE_ID_RADEON_BB, rt_r200, STD_RADEON, "ALL-IN-Wonder Radeon 8500 DV (BB)" },
{ DEVICE_ID_RADEON_BC , rt_r200, STD_RADEON, "ALL-IN-Wonder Radeon 8500 DV (BC)" }, { DEVICE_ID_RADEON_BC, rt_r200, STD_RADEON, "ALL-IN-Wonder Radeon 8500 DV (BC)" },
// RV250 (cut-down R200 with integrated TV-Out) // RV250 (cut-down R200 with integrated TV-Out)
{ DEVICE_ID_RADEON_If , rt_rv250, STD_RADEON, "Radeon 9000" }, { DEVICE_ID_RADEON_If, rt_rv250, STD_RADEON, "Radeon 9000" },
{ DEVICE_ID_RADEON_Ig , rt_rv250, STD_RADEON, "Radeon 9000 Ig" }, { DEVICE_ID_RADEON_Ig, rt_rv250, STD_RADEON, "Radeon 9000 Ig" },
// M9 (based on rv250) was rt_m9 // M9 (based on rv250) was rt_m9
{ DEVICE_ID_RADEON_Ld , rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Ld" }, { DEVICE_ID_RADEON_Ld, rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Ld" },
{ DEVICE_ID_RADEON_Le , rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Le" }, { DEVICE_ID_RADEON_Le, rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Le" },
{ DEVICE_ID_RADEON_Lf , rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Lf" }, { DEVICE_ID_RADEON_Lf, rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Lf" },
{ DEVICE_ID_RADEON_Lg , rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Lg" }, { DEVICE_ID_RADEON_Lg, rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Lg" },
// RV280 (rv250 but faster) // RV280 (rv250 but faster)
{ DEVICE_ID_RADEON_5960 , rt_rv280, STD_RADEON, "Radeon 9200 Pro" }, { DEVICE_ID_RADEON_5960, rt_rv280, STD_RADEON, "Radeon 9200 Pro" },
{ DEVICE_ID_RADEON_Za , rt_rv280, STD_RADEON, "Radeon 9200" }, { DEVICE_ID_RADEON_Za, rt_rv280, STD_RADEON, "Radeon 9200" },
{ DEVICE_ID_RADEON_Zb , rt_rv280, STD_RADEON, "Radeon 9200" }, { DEVICE_ID_RADEON_Zb, rt_rv280, STD_RADEON, "Radeon 9200" },
{ DEVICE_ID_RADEON_Zd , rt_rv280, STD_RADEON, "Radeon 9200 SE" }, { DEVICE_ID_RADEON_Zd, rt_rv280, STD_RADEON, "Radeon 9200 SE" },
{ DEVICE_ID_RADEON_Ze , rt_rv280, STD_RADEON, "Ati FireMV 2200" }, { DEVICE_ID_RADEON_Ze, rt_rv280, STD_RADEON, "Ati FireMV 2200" },
// M9+ (based on rv280) was rt_m9plus // M9+ (based on rv280) was rt_m9plus
{ DEVICE_ID_RADEON_5c61 , rt_rv280, ISMOBILITY, "Radeon Mobility 9200" }, { DEVICE_ID_RADEON_5c61, rt_rv280, ISMOBILITY, "Radeon Mobility 9200" },
{ DEVICE_ID_RADEON_5c63 , rt_rv280, ISMOBILITY, "Radeon Mobility 9200" }, { DEVICE_ID_RADEON_5c63, rt_rv280, ISMOBILITY, "Radeon Mobility 9200" },
// R300 // R300
{ DEVICE_ID_RADEON_ND , rt_r300, STD_RADEON, "Radeon 9700 ND" }, { DEVICE_ID_RADEON_ND, rt_r300, STD_RADEON, "Radeon 9700 ND" },
{ DEVICE_ID_RADEON_NE , rt_r300, STD_RADEON, "Radeon 9700 NE" }, { DEVICE_ID_RADEON_NE, rt_r300, STD_RADEON, "Radeon 9700 NE" },
{ DEVICE_ID_RADEON_NF , rt_r300, STD_RADEON, "Radeon 9600 XT" }, { DEVICE_ID_RADEON_NF, rt_r300, STD_RADEON, "Radeon 9600 XT" },
{ DEVICE_ID_RADEON_NG , rt_r300, STD_RADEON, "Radeon 9700 NG" }, { DEVICE_ID_RADEON_NG, rt_r300, STD_RADEON, "Radeon 9700 NG" },
// r300-4P // r300-4P
{ DEVICE_ID_RADEON_AD , rt_r300, STD_RADEON, "Radeon 9700 AD" }, { DEVICE_ID_RADEON_AD, rt_r300, STD_RADEON, "Radeon 9700 AD" },
{ DEVICE_ID_RADEON_AE , rt_r300, STD_RADEON, "Radeon 9700 AE" }, { DEVICE_ID_RADEON_AE, rt_r300, STD_RADEON, "Radeon 9700 AE" },
{ DEVICE_ID_RADEON_AF , rt_r300, STD_RADEON, "Radeon 9700 AF" }, { DEVICE_ID_RADEON_AF, rt_r300, STD_RADEON, "Radeon 9700 AF" },
{ DEVICE_ID_RADEON_AG , rt_r300, STD_RADEON, "Radeon 9700 AG" }, { DEVICE_ID_RADEON_AG, rt_r300, STD_RADEON, "Radeon 9700 AG" },
// RV350 // RV350
{ DEVICE_ID_RADEON_AP , rt_rv350, STD_RADEON, "Radeon 9600 AP" }, { DEVICE_ID_RADEON_AP, rt_rv350, STD_RADEON, "Radeon 9600 AP" },
{ DEVICE_ID_RADEON_AQ , rt_rv350, STD_RADEON, "Radeon 9600SE AQ" }, { DEVICE_ID_RADEON_AQ, rt_rv350, STD_RADEON, "Radeon 9600SE AQ" },
{ DEVICE_ID_RADEON_AR , rt_rv350, STD_RADEON, "Radeon 9600XT AR" }, { DEVICE_ID_RADEON_AR, rt_rv350, STD_RADEON, "Radeon 9600XT AR" },
{ DEVICE_ID_RADEON_AS , rt_rv350, STD_RADEON, "Radeon 9550 AS" }, { DEVICE_ID_RADEON_AS, rt_rv350, STD_RADEON, "Radeon 9550 AS" },
{ DEVICE_ID_RADEON_AT , rt_rv350, STD_RADEON, "FireGL T2 AT" }, { DEVICE_ID_RADEON_AT, rt_rv350, STD_RADEON, "FireGL T2 AT" },
{ DEVICE_ID_RADEON_4155 , rt_rv350, STD_RADEON, "Radeon 9650 4155" }, { DEVICE_ID_RADEON_4155, rt_rv350, STD_RADEON, "Radeon 9650 4155" },
{ DEVICE_ID_RADEON_AV , rt_rv350, STD_RADEON, "Radeon 9600 AQ" }, { DEVICE_ID_RADEON_AV, rt_rv350, STD_RADEON, "Radeon 9600 AQ" },
// rv350 M10 (based on rv350) was rt_m10 // rv350 M10 (based on rv350) was rt_m10
{ DEVICE_ID_RADEON_NP , rt_rv350, ISMOBILITY, "Radeon Mobility 9600/9700 (M10/M11) NP " }, { DEVICE_ID_RADEON_NP, rt_rv350, ISMOBILITY, "Radeon Mobility 9600/9700 (M10/M11) NP " },
{ DEVICE_ID_RADEON_NQ , rt_rv350, ISMOBILITY, "Radeon Mobility 9600 (M10) NQ " }, { DEVICE_ID_RADEON_NQ, rt_rv350, ISMOBILITY, "Radeon Mobility 9600 (M10) NQ " },
{ DEVICE_ID_RADEON_NR , rt_rv350, ISMOBILITY, "Radeon Mobility 9600 (M11) NR " }, { DEVICE_ID_RADEON_NR, rt_rv350, ISMOBILITY, "Radeon Mobility 9600 (M11) NR " },
{ DEVICE_ID_RADEON_NS , rt_rv350, ISMOBILITY, "Radeon Mobility 9600 (M10) NS " }, { DEVICE_ID_RADEON_NS, rt_rv350, ISMOBILITY, "Radeon Mobility 9600 (M10) NS " },
{ DEVICE_ID_RADEON_NT , rt_rv350, ISMOBILITY, "ATI FireGL Mobility T2 (M10) NT" }, { DEVICE_ID_RADEON_NT, rt_rv350, ISMOBILITY, "ATI FireGL Mobility T2 (M10) NT" },
{ DEVICE_ID_RADEON_NV , rt_rv350, ISMOBILITY, "ATI FireGL Mobility T2e (M11) NV" }, { DEVICE_ID_RADEON_NV, rt_rv350, ISMOBILITY, "ATI FireGL Mobility T2e (M11) NV" },
// R350 // R350
{ DEVICE_ID_RADEON_AH , rt_r350, STD_RADEON, "Radeon 9800SE AH" }, { DEVICE_ID_RADEON_AH, rt_r350, STD_RADEON, "Radeon 9800SE AH" },
{ DEVICE_ID_RADEON_AI , rt_r350, STD_RADEON, "Radeon 9800 AI" }, { DEVICE_ID_RADEON_AI, rt_r350, STD_RADEON, "Radeon 9800 AI" },
{ DEVICE_ID_RADEON_AJ , rt_r350, STD_RADEON, "Radeon 9800 AJ" }, { DEVICE_ID_RADEON_AJ, rt_r350, STD_RADEON, "Radeon 9800 AJ" },
{ DEVICE_ID_RADEON_AK , rt_r350, STD_RADEON, "FireGL X2 AK" }, { DEVICE_ID_RADEON_AK, rt_r350, STD_RADEON, "FireGL X2 AK" },
{ DEVICE_ID_RADEON_NH , rt_r350, STD_RADEON, "Radeon 9800 Pro NH" }, { DEVICE_ID_RADEON_NH, rt_r350, STD_RADEON, "Radeon 9800 Pro NH" },
{ DEVICE_ID_RADEON_NI , rt_r350, STD_RADEON, "Radeon 9800 NI" }, { DEVICE_ID_RADEON_NI, rt_r350, STD_RADEON, "Radeon 9800 NI" },
{ DEVICE_ID_RADEON_NK , rt_r350, STD_RADEON, "FireGL X2 NK" }, { DEVICE_ID_RADEON_NK, rt_r350, STD_RADEON, "FireGL X2 NK" },
{ DEVICE_ID_RADEON_NJ , rt_r350, STD_RADEON, "Radeon 9800 XT" }, { DEVICE_ID_RADEON_NJ, rt_r350, STD_RADEON, "Radeon 9800 XT" },
// rv370 // rv370
{ DEVICE_ID_RADEON_5b60 , rt_rv380, STD_RADEON, "Radeon X300 (RV370) 5B60" }, { DEVICE_ID_RADEON_5b60, rt_rv380, STD_RADEON, "Radeon X300 (RV370) 5B60" },
{ DEVICE_ID_RADEON_5b62 , rt_rv380, STD_RADEON, "Radeon X600 (RV370) 5B62" }, { DEVICE_ID_RADEON_5b62, rt_rv380, STD_RADEON, "Radeon X600 (RV370) 5B62" },
{ DEVICE_ID_RADEON_5b63 , rt_rv380, STD_RADEON, "Radeon X1050 (RV370) 5B63" }, { DEVICE_ID_RADEON_5b63, rt_rv380, STD_RADEON, "Radeon X1050 (RV370) 5B63" },
{ DEVICE_ID_RADEON_5b64 , rt_rv380, STD_RADEON, "FireGL V3100 (RV370) 5B64" }, { DEVICE_ID_RADEON_5b64, rt_rv380, STD_RADEON, "FireGL V3100 (RV370) 5B64" },
{ DEVICE_ID_RADEON_5b65 , rt_rv380, STD_RADEON, "FireGL D1100 (RV370) 5B65" }, { DEVICE_ID_RADEON_5b65, rt_rv380, STD_RADEON, "FireGL D1100 (RV370) 5B65" },
{ DEVICE_ID_RADEON_5460 , rt_rv380, ISMOBILITY, "Radeon Mobility M300 (M22) 5460" }, { DEVICE_ID_RADEON_5460, rt_rv380, ISMOBILITY, "Radeon Mobility M300 (M22) 5460" },
{ DEVICE_ID_RADEON_5464 , rt_rv380, ISMOBILITY, "FireGL M22 GL 5464" }, { DEVICE_ID_RADEON_5464, rt_rv380, ISMOBILITY, "FireGL M22 GL 5464" },
// rv380 // rv380
{ DEVICE_ID_RADEON_3e50 , rt_rv380, STD_RADEON, "Radeon X600 (RV380) 3E50" }, { DEVICE_ID_RADEON_3e50, rt_rv380, STD_RADEON, "Radeon X600 (RV380) 3E50" },
{ DEVICE_ID_RADEON_3e54 , rt_rv380, STD_RADEON, "FireGL V3200 (RV380) 3E54" }, { DEVICE_ID_RADEON_3e54, rt_rv380, STD_RADEON, "FireGL V3200 (RV380) 3E54" },
{ DEVICE_ID_RADEON_3150 , rt_rv380, ISMOBILITY, "Radeon Mobility X600 (M24) 3150" }, { DEVICE_ID_RADEON_3150, rt_rv380, ISMOBILITY, "Radeon Mobility X600 (M24) 3150" },
{ DEVICE_ID_RADEON_3154 , rt_rv380, ISMOBILITY, "FireGL M24 GL 3154" }, { DEVICE_ID_RADEON_3154, rt_rv380, ISMOBILITY, "FireGL M24 GL 3154" },
{ DEVICE_ID_RADEON_5462 , rt_rv380, ISMOBILITY, "Radeon X600SE (RV3?0) 5462" }, { DEVICE_ID_RADEON_5462, rt_rv380, ISMOBILITY, "Radeon X600SE (RV3?0) 5462" },
// rv380 // rv380
{ DEVICE_ID_RADEON_5b62 , rt_rv380, STD_RADEON, "Radeon X600 AIW" }, { DEVICE_ID_RADEON_5b62, rt_rv380, STD_RADEON, "Radeon X600 AIW" },
// rv410 // rv410
{ DEVICE_ID_RADEON_5e48 , rt_r420, STD_RADEON, "FireGL V5000 (RV410)" }, { DEVICE_ID_RADEON_5e48, rt_r420, STD_RADEON, "FireGL V5000 (RV410)" },
{ DEVICE_ID_RADEON_564a , rt_r420, ISMOBILITY, "Mobility FireGL V5000 (M26)" }, { DEVICE_ID_RADEON_564a, rt_r420, ISMOBILITY, "Mobility FireGL V5000 (M26)" },
{ DEVICE_ID_RADEON_564b , rt_r420, ISMOBILITY, "Mobility FireGL V5000 (M26)" }, { DEVICE_ID_RADEON_564b, rt_r420, ISMOBILITY, "Mobility FireGL V5000 (M26)" },
{ DEVICE_ID_RADEON_564f , rt_r420, ISMOBILITY, "Mobility Radeon X700 XL (M26)" }, { DEVICE_ID_RADEON_564f, rt_r420, ISMOBILITY, "Mobility Radeon X700 XL (M26)" },
{ DEVICE_ID_RADEON_5652 , rt_r420, ISMOBILITY, "Mobility Radeon X700 (M26)" }, { DEVICE_ID_RADEON_5652, rt_r420, ISMOBILITY, "Mobility Radeon X700 (M26)" },
{ DEVICE_ID_RADEON_5653 , rt_r420, ISMOBILITY, "Mobility Radeon X700 (M26)" }, { DEVICE_ID_RADEON_5653, rt_r420, ISMOBILITY, "Mobility Radeon X700 (M26)" },
{ DEVICE_ID_RADEON_5e4b , rt_r420, STD_RADEON, "Radeon X700 PRO (RV410)" }, { DEVICE_ID_RADEON_5e4b, rt_r420, STD_RADEON, "Radeon X700 PRO (RV410)" },
{ DEVICE_ID_RADEON_5e4a , rt_r420, STD_RADEON, "Radeon X700 XT (RV410)" }, { DEVICE_ID_RADEON_5e4a, rt_r420, STD_RADEON, "Radeon X700 XT (RV410)" },
{ DEVICE_ID_RADEON_5e4d , rt_r420, STD_RADEON, "Radeon X700 (RV410)" }, { DEVICE_ID_RADEON_5e4d, rt_r420, STD_RADEON, "Radeon X700 (RV410)" },
{ DEVICE_ID_RADEON_5e4c , rt_r420, STD_RADEON, "Radeon X700 SE (RV410)" }, { DEVICE_ID_RADEON_5e4c, rt_r420, STD_RADEON, "Radeon X700 SE (RV410)" },
{ DEVICE_ID_RADEON_5e4f , rt_r420, STD_RADEON, "Radeon X700 SE (RV410)" }, { DEVICE_ID_RADEON_5e4f, rt_r420, STD_RADEON, "Radeon X700 SE (RV410)" },
// r420 // r420
{ DEVICE_ID_RADEON_JH , rt_r420, STD_RADEON, "Radeon X800 (R420) JH" }, { DEVICE_ID_RADEON_JH, rt_r420, STD_RADEON, "Radeon X800 (R420) JH" },
{ DEVICE_ID_RADEON_JI , rt_r420, STD_RADEON, "Radeon X800PRO (R420) JI" }, { DEVICE_ID_RADEON_JI, rt_r420, STD_RADEON, "Radeon X800PRO (R420) JI" },
{ DEVICE_ID_RADEON_JJ , rt_r420, STD_RADEON, "Radeon X800SE (R420) JJ" }, { DEVICE_ID_RADEON_JJ, rt_r420, STD_RADEON, "Radeon X800SE (R420) JJ" },
{ DEVICE_ID_RADEON_JK , rt_r420, STD_RADEON, "Radeon X800 (R420) JK" }, { DEVICE_ID_RADEON_JK, rt_r420, STD_RADEON, "Radeon X800 (R420) JK" },
{ DEVICE_ID_RADEON_JL , rt_r420, STD_RADEON, "Radeon X800 (R420) JL" }, { DEVICE_ID_RADEON_JL, rt_r420, STD_RADEON, "Radeon X800 (R420) JL" },
{ DEVICE_ID_RADEON_JM , rt_r420, STD_RADEON, "FireGL X3 (R420) JM" }, { DEVICE_ID_RADEON_JM, rt_r420, STD_RADEON, "FireGL X3 (R420) JM" },
{ DEVICE_ID_RADEON_JN , rt_r420, ISMOBILITY, "Radeon Mobility 9800 (M18) JN" }, { DEVICE_ID_RADEON_JN, rt_r420, ISMOBILITY, "Radeon Mobility 9800 (M18) JN" },
{ DEVICE_ID_RADEON_JP , rt_r420, STD_RADEON, "Radeon X800XT (R420) JP" }, { DEVICE_ID_RADEON_JP, rt_r420, STD_RADEON, "Radeon X800XT (R420) JP" },
{ DEVICE_ID_RADEON_4a4f , rt_r420, STD_RADEON, "Radeon X800 SE (R420)" }, { DEVICE_ID_RADEON_4a4f, rt_r420, STD_RADEON, "Radeon X800 SE (R420)" },
// r423 // r423
{ DEVICE_ID_RADEON_UH , rt_r420, STD_RADEON, "Radeon X800 (R423) UH" }, { DEVICE_ID_RADEON_UH, rt_r420, STD_RADEON, "Radeon X800 (R423) UH" },
{ DEVICE_ID_RADEON_UI , rt_r420, STD_RADEON, "Radeon X800PRO (R423) UI" }, { DEVICE_ID_RADEON_UI, rt_r420, STD_RADEON, "Radeon X800PRO (R423) UI" },
{ DEVICE_ID_RADEON_UJ , rt_r420, STD_RADEON, "Radeon X800LE (R423) UJ" }, { DEVICE_ID_RADEON_UJ, rt_r420, STD_RADEON, "Radeon X800LE (R423) UJ" },
{ DEVICE_ID_RADEON_UK , rt_r420, STD_RADEON, "Radeon X800SE (R423) UK" }, { DEVICE_ID_RADEON_UK, rt_r420, STD_RADEON, "Radeon X800SE (R423) UK" },
{ DEVICE_ID_RADEON_UQ , rt_r420, STD_RADEON, "FireGL V7200 (R423) UQ" }, { DEVICE_ID_RADEON_UQ, rt_r420, STD_RADEON, "FireGL V7200 (R423) UQ" },
{ DEVICE_ID_RADEON_UR , rt_r420, STD_RADEON, "FireGL V5100 (R423) UR" }, { DEVICE_ID_RADEON_UR, rt_r420, STD_RADEON, "FireGL V5100 (R423) UR" },
{ DEVICE_ID_RADEON_UT , rt_r420, STD_RADEON, "FireGL V7100 (R423) UT" }, { DEVICE_ID_RADEON_UT, rt_r420, STD_RADEON, "FireGL V7100 (R423) UT" },
{ DEVICE_ID_RADEON_UO , rt_r420, STD_RADEON, "Radeon X800 UO" }, { DEVICE_ID_RADEON_UO, rt_r420, STD_RADEON, "Radeon X800 UO" },
{ DEVICE_ID_RADEON_UM , rt_r420, STD_RADEON, "Radeon X800 UM" }, { DEVICE_ID_RADEON_UM, rt_r420, STD_RADEON, "Radeon X800 UM" },
{ DEVICE_ID_RADEON_5d57 , rt_r420, STD_RADEON, "Radeon X800 XT" }, { DEVICE_ID_RADEON_5d57, rt_r420, STD_RADEON, "Radeon X800 XT" },
{ DEVICE_ID_RADEON_5550 , rt_r420, STD_RADEON, "FireGL V7100 (R423)" }, { DEVICE_ID_RADEON_5550, rt_r420, STD_RADEON, "FireGL V7100 (R423)" },
// r430 // r430
{ DEVICE_ID_RADEON_5d49 , rt_r420, ISMOBILITY, "Mobility FireGL V5100 (M28)" }, { DEVICE_ID_RADEON_5d49, rt_r420, ISMOBILITY, "Mobility FireGL V5100 (M28)" },
{ DEVICE_ID_RADEON_5d4a , rt_r420, ISMOBILITY, "Mobility Radeon X800 (M28)" }, { DEVICE_ID_RADEON_5d4a, rt_r420, ISMOBILITY, "Mobility Radeon X800 (M28)" },
{ DEVICE_ID_RADEON_5d48 , rt_r420, ISMOBILITY, "Mobility Radeon X800 XT (M28)" }, { DEVICE_ID_RADEON_5d48, rt_r420, ISMOBILITY, "Mobility Radeon X800 XT (M28)" },
{ DEVICE_ID_RADEON_554f , rt_r420, STD_RADEON, "Radeon X800 (R430)" }, { DEVICE_ID_RADEON_554f, rt_r420, STD_RADEON, "Radeon X800 (R430)" },
{ DEVICE_ID_RADEON_554d , rt_r420, STD_RADEON, "Radeon X800 XL (R430)" }, { DEVICE_ID_RADEON_554d, rt_r420, STD_RADEON, "Radeon X800 XL (R430)" },
{ DEVICE_ID_RADEON_554e , rt_r420, STD_RADEON, "Radeon X800 SE (R430)" }, { DEVICE_ID_RADEON_554e, rt_r420, STD_RADEON, "Radeon X800 SE (R430)" },
{ DEVICE_ID_RADEON_554c , rt_r420, STD_RADEON, "Radeon X800 XTP (R430)" }, { DEVICE_ID_RADEON_554c, rt_r420, STD_RADEON, "Radeon X800 XTP (R430)" },
// r480 // r480
{ DEVICE_ID_RADEON_5d4c , rt_r420, STD_RADEON, "Radeon X850 5D4C" }, { DEVICE_ID_RADEON_5d4c, rt_r420, STD_RADEON, "Radeon X850 5D4C" },
{ DEVICE_ID_RADEON_5d50 , rt_r420, STD_RADEON, "Radeon FireGL (R480) GL 5D50" }, { DEVICE_ID_RADEON_5d50, rt_r420, STD_RADEON, "Radeon FireGL (R480) GL 5D50" },
{ DEVICE_ID_RADEON_5d4e , rt_r420, STD_RADEON, "Radeon X850 SE (R480)" }, { DEVICE_ID_RADEON_5d4e, rt_r420, STD_RADEON, "Radeon X850 SE (R480)" },
{ DEVICE_ID_RADEON_5d4f , rt_r420, STD_RADEON, "Radeon X850 PRO (R480)" }, { DEVICE_ID_RADEON_5d4f, rt_r420, STD_RADEON, "Radeon X850 PRO (R480)" },
{ DEVICE_ID_RADEON_5d52 , rt_r420, STD_RADEON, "Radeon X850 XT (R480)" }, { DEVICE_ID_RADEON_5d52, rt_r420, STD_RADEON, "Radeon X850 XT (R480)" },
{ DEVICE_ID_RADEON_5d4d , rt_r420, STD_RADEON, "Radeon X850 XT PE (R480)" }, { DEVICE_ID_RADEON_5d4d, rt_r420, STD_RADEON, "Radeon X850 XT PE (R480)" },
// r481 // r481
{ DEVICE_ID_RADEON_KJ , rt_r420, STD_RADEON, "Radeon X850 PRO (R480)" }, { DEVICE_ID_RADEON_KJ, rt_r420, STD_RADEON, "Radeon X850 PRO (R480)" },
{ DEVICE_ID_RADEON_KK , rt_r420, STD_RADEON, "Radeon X850 SE (R480)" }, { DEVICE_ID_RADEON_KK, rt_r420, STD_RADEON, "Radeon X850 SE (R480)" },
{ DEVICE_ID_RADEON_KL , rt_r420, STD_RADEON, "Radeon X850 XT (R480)" }, { DEVICE_ID_RADEON_KL, rt_r420, STD_RADEON, "Radeon X850 XT (R480)" },
{ DEVICE_ID_RADEON_KI , rt_r420, STD_RADEON, "Radeon X850 XT PE (R480)" }, { DEVICE_ID_RADEON_KI, rt_r420, STD_RADEON, "Radeon X850 XT PE (R480)" },
// rs100 (aka IGP 320) // rs100 (aka IGP 320)
{ DEVICE_ID_RS100_4136 , rt_rs100, INTEGRATED, "Radeon IGP320 (A3) 4136" }, { DEVICE_ID_RS100_4136, rt_rs100, INTEGRATED, "Radeon IGP320 (A3) 4136" },
{ DEVICE_ID_RS100_4336 , rt_rs100, MOBILE_IGP, "Radeon IGP320M (U1) 4336" }, { DEVICE_ID_RS100_4336, rt_rs100, MOBILE_IGP, "Radeon IGP320M (U1) 4336" },
// rs200 (aka IGP 340) // rs200 (aka IGP 340)
{ DEVICE_ID_RS200_4137 , rt_rs200, INTEGRATED, "Radeon IGP330/340/350 (A4) 4137" }, { DEVICE_ID_RS200_4137, rt_rs200, INTEGRATED, "Radeon IGP330/340/350 (A4) 4137" },
{ DEVICE_ID_RS200_4337 , rt_rs200, MOBILE_IGP, "Radeon IGP330M/340M/350M (U2) 4337" }, { DEVICE_ID_RS200_4337, rt_rs200, MOBILE_IGP, "Radeon IGP330M/340M/350M (U2) 4337" },
// rs250 (aka 7000 IGP) // rs250 (aka 7000 IGP)
{ DEVICE_ID_RS250_4237 , rt_rs200, INTEGRATED, "IGP330M/340M/350M (U2) 4337" }, { DEVICE_ID_RS250_4237, rt_rs200, INTEGRATED, "IGP330M/340M/350M (U2) 4337" },
{ DEVICE_ID_RS250_4437 , rt_rs200, MOBILE_IGP, "Radeon Mobility 7000 IGP 4437" }, { DEVICE_ID_RS250_4437, rt_rs200, MOBILE_IGP, "Radeon Mobility 7000 IGP 4437" },
// rs300 // rs300
{ DEVICE_ID_RS300_5834 , rt_rs300, INTEGRATED, "Radeon 9100 IGP (A5) 5834" }, { DEVICE_ID_RS300_5834, rt_rs300, INTEGRATED, "Radeon 9100 IGP (A5) 5834" },
{ DEVICE_ID_RS300_5835 , rt_rs300, MOBILE_IGP, "Radeon Mobility 9100 IGP (U3) 5835" }, { DEVICE_ID_RS300_5835, rt_rs300, MOBILE_IGP, "Radeon Mobility 9100 IGP (U3) 5835" },
// rs350 // rs350
{ DEVICE_ID_RS350_7834 , rt_rs300, INTEGRATED, "Radeon 9100 PRO IGP 7834" }, { DEVICE_ID_RS350_7834, rt_rs300, INTEGRATED, "Radeon 9100 PRO IGP 7834" },
{ DEVICE_ID_RS350_7835 , rt_rs300, MOBILE_IGP, "Radeon Mobility 9200 IGP 7835" }, { DEVICE_ID_RS350_7835, rt_rs300, MOBILE_IGP, "Radeon Mobility 9200 IGP 7835" },
// rs400 // rs400
{ DEVICE_ID_RS400_5a41 , rt_rv380, STD_RADEON, "Radeon XPRESS 200 5A41" }, // X.org people unsure what this is for now { DEVICE_ID_RS400_5a41, rt_rv380, STD_RADEON, "Radeon XPRESS 200 5A41" }, // X.org people unsure what this is for now
{ DEVICE_ID_RS400_5a42 , rt_rv380, ISMOBILITY, "Radeon XPRESS 200M 5A42" }, { DEVICE_ID_RS400_5a42, rt_rv380, ISMOBILITY, "Radeon XPRESS 200M 5A42" },
// rs410 // rs410
{ DEVICE_ID_RS410_5a61 , rt_rv380, STD_RADEON, "Radeon XPRESS 200 5A61" }, // X.org people unsure what this is for now { DEVICE_ID_RS410_5a61, rt_rv380, STD_RADEON, "Radeon XPRESS 200 5A61" }, // X.org people unsure what this is for now
{ DEVICE_ID_RS410_5a62 , rt_rv380, ISMOBILITY, "Radeon XPRESS 200M 5A62" }, { DEVICE_ID_RS410_5a62, rt_rv380, ISMOBILITY, "Radeon XPRESS 200M 5A62" },
// rs480 // rs480
{ DEVICE_ID_RS480_5954 , rt_rv380, STD_RADEON, "Radeon XPRESS 200 5954" }, // X.org people unsure what this is for now { DEVICE_ID_RS480_5954, rt_rv380, STD_RADEON, "Radeon XPRESS 200 5954" }, // X.org people unsure what this is for now
{ DEVICE_ID_RS480_5955 , rt_rv380, ISMOBILITY, "Radeon XPRESS 200M 5955" }, { DEVICE_ID_RS480_5955, rt_rv380, ISMOBILITY, "Radeon XPRESS 200M 5955" },
{ DEVICE_ID_RS482_5974 , rt_rv380, STD_RADEON, "Radeon XPRESS 200 5974" }, // X.org people unsure what this is for now { DEVICE_ID_RS482_5974, rt_rv380, STD_RADEON, "Radeon XPRESS 200 5974" }, // X.org people unsure what this is for now
{ DEVICE_ID_RS482_5975 , rt_rv380, ISMOBILITY, "Radeon XPRESS 200M 5975" }, { DEVICE_ID_RS482_5975, rt_rv380, ISMOBILITY, "Radeon XPRESS 200M 5975" },
{ 0, 0, 0, NULL } { 0, 0, 0, NULL }
}; };
@ -480,31 +480,32 @@ static struct {
}; };
// check, whether there is *any* supported card plugged in // check, whether there is *any* supported card plugged in
bool Radeon_CardDetect( void ) bool Radeon_CardDetect(void)
{ {
long pci_index = 0; long pci_index = 0;
pci_info pcii; pci_info pcii;
bool found_one = FALSE; bool found_one = FALSE;
if (get_module(B_PCI_MODULE_NAME, (module_info **)&pci_bus) != B_OK) if (get_module(B_PCI_MODULE_NAME, (module_info **)&pci_bus) != B_OK)
return B_ERROR; return B_ERROR;
while ((*pci_bus->get_nth_pci_info)(pci_index, &pcii) == B_NO_ERROR) { while ((*pci_bus->get_nth_pci_info)(pci_index, &pcii) == B_NO_ERROR) {
int vendor = 0; int vendor = 0;
while (SupportedVendors[vendor].vendor_id) { while (SupportedVendors[vendor].vendor_id) {
if (SupportedVendors[vendor].vendor_id == pcii.vendor_id) { if (SupportedVendors[vendor].vendor_id == pcii.vendor_id) {
RadeonDevice *devices = SupportedVendors[vendor].devices; RadeonDevice *devices = SupportedVendors[vendor].devices;
while (devices->device_id) {
if (devices->device_id == pcii.device_id ) {
rom_info ri;
if( Radeon_MapBIOS( &pcii, &ri ) == B_OK ) {
Radeon_UnmapBIOS( &ri );
SHOW_INFO( 0, "found supported device pci index %ld, device 0x%04x/0x%04x", while (devices->device_id) {
pci_index, pcii.vendor_id, pcii.device_id ); if (devices->device_id == pcii.device_id) {
rom_info ri;
if (Radeon_MapBIOS(&pcii, &ri) == B_OK) {
Radeon_UnmapBIOS(&ri);
SHOW_INFO(0, "found supported device"
" pci index %ld, device 0x%04x/0x%04x",
pci_index, pcii.vendor_id, pcii.device_id);
found_one = TRUE; found_one = TRUE;
goto done; goto done;
} }
@ -517,14 +518,15 @@ bool Radeon_CardDetect( void )
pci_index++; pci_index++;
} }
SHOW_INFO0( 0, "no supported devices found" ); SHOW_INFO0(0, "no supported devices found");
done: done:
put_module(B_PCI_MODULE_NAME); put_module(B_PCI_MODULE_NAME);
return (found_one ? B_OK : B_ERROR); return (found_one ? B_OK : B_ERROR);
} }
// !extend this array whenever a new ASIC is a added! // !extend this array whenever a new ASIC is a added!
static struct { static struct {
const char *name; // name of ASIC const char *name; // name of ASIC
@ -534,41 +536,42 @@ static struct {
bool new_pll; // reference divider of PPLL moved to other location bool new_pll; // reference divider of PPLL moved to other location
} asic_properties[] = } asic_properties[] =
{ {
{ "r100", tc_external_rt1, false, true, false,}, { "r100", tc_external_rt1, false, true, false},
{ "rv100", tc_internal_rt1, true, true, false,}, { "rv100", tc_internal_rt1, true, true, false},
{ "rs100", tc_internal_rt1, true, false, false,}, { "rs100", tc_internal_rt1, true, false, false},
{ "rv200", tc_internal_rt2, true, true, false,}, { "rv200", tc_internal_rt2, true, true, false},
{ "rs200", tc_internal_rt1, true, false, false,}, { "rs200", tc_internal_rt1, true, false, false},
{ "r200", tc_external_rt1, true, true, false,}, { "r200", tc_external_rt1, true, true, false},
{ "rv250", tc_internal_rt2, true, true, false,}, { "rv250", tc_internal_rt2, true, true, false},
{ "rs300", tc_internal_rt1, true, false, false,}, { "rs300", tc_internal_rt1, true, false, false},
{ "rv280", tc_internal_rt2, true, true, false,}, { "rv280", tc_internal_rt2, true, true, false},
{ "r300", tc_internal_rt2, true, true, true, }, { "r300", tc_internal_rt2, true, true, true },
{ "r350", tc_internal_rt2, true, true, true, }, { "r350", tc_internal_rt2, true, true, true },
{ "rv350", tc_internal_rt2, true, true, true, }, { "rv350", tc_internal_rt2, true, true, true },
{ "rv380", tc_internal_rt2, true, true, true, }, { "rv380", tc_internal_rt2, true, true, true },
{ "r420", tc_internal_rt2, true, true, true, } { "r420", tc_internal_rt2, true, true, true }
}; };
// get next supported device // get next supported device
static bool probeDevice( device_info *di ) static bool probeDevice(device_info *di)
{ {
int vendor; int vendor;
/* if we match a supported vendor */ /* if we match a supported vendor */
for( vendor = 0; SupportedVendors[vendor].vendor_id; ++vendor ) { for (vendor = 0; SupportedVendors[vendor].vendor_id; ++vendor) {
RadeonDevice *device; RadeonDevice *device;
if( SupportedVendors[vendor].vendor_id != di->pcii.vendor_id ) if (SupportedVendors[vendor].vendor_id != di->pcii.vendor_id)
continue; continue;
for( device = SupportedVendors[vendor].devices; device->device_id; ++device ) { for (device = SupportedVendors[vendor].devices; device->device_id;
++device) {
// avoid double-detection // avoid double-detection
if (device->device_id != di->pcii.device_id ) if (device->device_id != di->pcii.device_id)
continue; continue;
di->num_crtc = asic_properties[device->asic].has_crtc2 ? 2 : 1; di->num_crtc = asic_properties[device->asic].has_crtc2 ? 2 : 1;
di->tv_chip = asic_properties[device->asic].tv_chip; di->tv_chip = asic_properties[device->asic].tv_chip;
di->asic = device->asic; di->asic = device->asic;
@ -576,11 +579,11 @@ static bool probeDevice( device_info *di )
di->has_vip = asic_properties[device->asic].has_vip; di->has_vip = asic_properties[device->asic].has_vip;
di->new_pll = asic_properties[device->asic].new_pll; di->new_pll = asic_properties[device->asic].new_pll;
di->is_igp = (device->features & INTEGRATED) ? true : false; di->is_igp = (device->features & INTEGRATED) ? true : false;
// detect chips with broken I2C // detect chips with broken I2C
switch( device->device_id) switch(device->device_id)
{ {
case DEVICE_ID_RADEON_LY: case DEVICE_ID_RADEON_LY:
case DEVICE_ID_RADEON_LZ: case DEVICE_ID_RADEON_LZ:
case DEVICE_ID_RADEON_LW: case DEVICE_ID_RADEON_LW:
case DEVICE_ID_RADEON_LX: case DEVICE_ID_RADEON_LX:
@ -588,33 +591,33 @@ static bool probeDevice( device_info *di )
case DEVICE_ID_RADEON_Ig: case DEVICE_ID_RADEON_Ig:
case DEVICE_ID_RADEON_5460: case DEVICE_ID_RADEON_5460:
case DEVICE_ID_RADEON_5464: case DEVICE_ID_RADEON_5464:
di->has_no_i2c = true; di->has_no_i2c = true;
break;
default: default:
di->has_no_i2c = false; di->has_no_i2c = false;
} }
// disable 2d DMA engine for chips that don't work with our // disable 2d DMA engine for chips that don't work with our
// dma code (yet). I would have used asic type, but R410s are // dma code (yet). I would have used asic type, but R410s are
// treated same asic as r420s in code, and the AGP x800 works fine. // treated same asic as r420s in code, and the AGP x800 works fine.
switch ( device->device_id ) switch (device->device_id)
{ {
// rv370 // rv370
case DEVICE_ID_RADEON_5b60: case DEVICE_ID_RADEON_5b60:
case DEVICE_ID_RADEON_5b62: case DEVICE_ID_RADEON_5b62:
case DEVICE_ID_RADEON_5b64: case DEVICE_ID_RADEON_5b64:
case DEVICE_ID_RADEON_5b65: case DEVICE_ID_RADEON_5b65:
case DEVICE_ID_RADEON_5460: case DEVICE_ID_RADEON_5460:
case DEVICE_ID_RADEON_5464: case DEVICE_ID_RADEON_5464:
// rv380 // rv380
case DEVICE_ID_RADEON_3e50: case DEVICE_ID_RADEON_3e50:
case DEVICE_ID_RADEON_3e54: case DEVICE_ID_RADEON_3e54:
case DEVICE_ID_RADEON_3150: case DEVICE_ID_RADEON_3150:
case DEVICE_ID_RADEON_3154: case DEVICE_ID_RADEON_3154:
case DEVICE_ID_RADEON_5462: case DEVICE_ID_RADEON_5462:
// rv410 // rv410
case DEVICE_ID_RADEON_5e48: case DEVICE_ID_RADEON_5e48:
case DEVICE_ID_RADEON_564a: case DEVICE_ID_RADEON_564a:
case DEVICE_ID_RADEON_564b: case DEVICE_ID_RADEON_564b:
@ -627,51 +630,53 @@ static bool probeDevice( device_info *di )
case DEVICE_ID_RADEON_5e4c: case DEVICE_ID_RADEON_5e4c:
case DEVICE_ID_RADEON_5e4f: case DEVICE_ID_RADEON_5e4f:
// rs400 // rs400
case DEVICE_ID_RS400_5a41: case DEVICE_ID_RS400_5a41:
case DEVICE_ID_RS400_5a42: case DEVICE_ID_RS400_5a42:
// rs410 // rs410
case DEVICE_ID_RS410_5a61: case DEVICE_ID_RS410_5a61:
case DEVICE_ID_RS410_5a62: case DEVICE_ID_RS410_5a62:
// r430 // r430
case DEVICE_ID_RADEON_UM: case DEVICE_ID_RADEON_UM:
// rs480
// rs480
case DEVICE_ID_RS480_5954: case DEVICE_ID_RS480_5954:
case DEVICE_ID_RS480_5955: case DEVICE_ID_RS480_5955:
case DEVICE_ID_RS482_5974: case DEVICE_ID_RS482_5974:
case DEVICE_ID_RS482_5975: case DEVICE_ID_RS482_5975:
di->acc_dma = false; di->acc_dma = false;
break; break;
default: default:
di->acc_dma = true; di->acc_dma = true;
break; break;
} }
if( Radeon_MapBIOS( &di->pcii, &di->rom ) != B_OK ) if (Radeon_MapBIOS(&di->pcii, &di->rom) != B_OK)
// give up checking this device - no BIOS, no fun // give up checking this device - no BIOS, no fun
return false; return false;
if( Radeon_ReadBIOSData( di ) != B_OK ) { if (Radeon_ReadBIOSData(di) != B_OK) {
Radeon_UnmapBIOS( &di->rom ); Radeon_UnmapBIOS(&di->rom);
return false; return false;
} }
// we don't need BIOS any more // we don't need BIOS any more
Radeon_UnmapBIOS( &di->rom ); Radeon_UnmapBIOS(&di->rom);
SHOW_INFO( 0, "found %s; ASIC: %s", device->name, asic_properties[device->asic].name ); SHOW_INFO(0, "found %s; ASIC: %s", device->name,
asic_properties[device->asic].name);
sprintf(di->name, "graphics/%04X_%04X_%02X%02X%02X", sprintf(di->name, "graphics/%04X_%04X_%02X%02X%02X",
di->pcii.vendor_id, di->pcii.device_id, di->pcii.vendor_id, di->pcii.device_id,
di->pcii.bus, di->pcii.device, di->pcii.function); di->pcii.bus, di->pcii.device, di->pcii.function);
SHOW_FLOW( 3, "making /dev/%s", di->name ); SHOW_FLOW(3, "making /dev/%s", di->name);
// we always publish it as a video grabber; we should check for Rage // we always publish it as a video grabber; we should check for Rage
// Theater, but the corresponding code (vip.c) needs a fully initialized // Theater, but the corresponding code (vip.c) needs a fully
// driver, and this is too much hazzly, so we leave it to the media add-on // initialized driver, and this is too much hazzly, so we leave it
// to verify that the card really supports video-in // to the media add-on to verify that the card supports video-in
sprintf(di->video_name, "video/radeon/%04X_%04X_%02X%02X%02X", sprintf(di->video_name, "video/radeon/%04X_%04X_%02X%02X%02X",
di->pcii.vendor_id, di->pcii.device_id, di->pcii.vendor_id, di->pcii.device_id,
di->pcii.bus, di->pcii.device, di->pcii.function); di->pcii.bus, di->pcii.device, di->pcii.function);
@ -679,11 +684,11 @@ static bool probeDevice( device_info *di )
di->is_open = 0; di->is_open = 0;
di->shared_area = -1; di->shared_area = -1;
di->si = NULL; di->si = NULL;
return true; return true;
} }
} }
return false; return false;
} }
@ -692,30 +697,30 @@ static bool probeDevice( device_info *di )
// (currently, we rely on proper BIOS detection, which // (currently, we rely on proper BIOS detection, which
// only works for primary graphics adapter, so multiple // only works for primary graphics adapter, so multiple
// devices won't really work) // devices won't really work)
void Radeon_ProbeDevices( void ) void Radeon_ProbeDevices(void)
{ {
uint32 pci_index = 0; uint32 pci_index = 0;
uint32 count = 0; uint32 count = 0;
device_info *di = devices->di; device_info *di = devices->di;
while( count < MAX_DEVICES ) { while (count < MAX_DEVICES) {
memset( di, 0, sizeof( *di )); memset(di, 0, sizeof(*di));
if( (*pci_bus->get_nth_pci_info)(pci_index, &(di->pcii)) != B_NO_ERROR) if ((*pci_bus->get_nth_pci_info)(pci_index, &(di->pcii)) != B_NO_ERROR)
break; break;
if( probeDevice( di )) { if (probeDevice(di)) {
devices->device_names[2*count] = di->name; devices->device_names[2 * count] = di->name;
devices->device_names[2*count+1] = di->video_name; devices->device_names[2 * count + 1] = di->video_name;
di++; di++;
count++; count++;
} }
pci_index++; pci_index++;
} }
devices->count = count; devices->count = count;
devices->device_names[2*count] = NULL; devices->device_names[2 * count] = NULL;
SHOW_INFO( 0, "%ld supported devices", count ); SHOW_INFO(0, "%ld supported devices", count);
} }