[haiku-commits] r40766 - haiku/trunk/src/add-ons/kernel/drivers/graphics/radeon

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 1 Mar 2011 20:26:35 +0100 (CET)

Author: kallisti5
Date: 2011-03-01 20:26:35 +0100 (Tue, 01 Mar 2011)
New Revision: 40766
Changeset: http://dev.haiku-os.org/changeset/40766

Modified:
   haiku/trunk/src/add-ons/kernel/drivers/graphics/radeon/detect.c
Log:
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

Modified: haiku/trunk/src/add-ons/kernel/drivers/graphics/radeon/detect.c
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/graphics/radeon/detect.c     
2011-03-01 18:42:18 UTC (rev 40765)
+++ haiku/trunk/src/add-ons/kernel/drivers/graphics/radeon/detect.c     
2011-03-01 19:26:35 UTC (rev 40766)
@@ -134,12 +134,12 @@
 #define DEVICE_ID_RADEON_3e54  0x3e54 // new
 #define DEVICE_ID_RADEON_3150  0x3150 // 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
 
-// rv410 X700 pro 
+// rv410 X700 pro
 #define DEVICE_ID_RADEON_5e48  0x5e48 // new
 #define DEVICE_ID_RADEON_564a  0x564a // new
 #define DEVICE_ID_RADEON_564b  0x564b // new
@@ -245,226 +245,226 @@
 
 #define STD_RADEON 0 // common as muck PC graphics card (if there is such a 
thing)
 #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
 
 // list of supported devices
 RadeonDevice radeon_device_list[] = {
        // original Radeons, now called r100
-       { 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_QF   ,       rt_r100,        STD_RADEON,     "Radeon 
QF" },
-       { DEVICE_ID_RADEON_QG   ,       rt_r100,        STD_RADEON,     "Radeon 
QG" },
+       { 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_QF, rt_r100, STD_RADEON, "Radeon QF" },
+       { 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
-       { 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_QY, rt_rv100, STD_RADEON, "Radeon 7000 / Radeon 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_5969      ,       rt_rv100,       STD_RADEON,     "ES1000 
5969 (PCI)" },
+       { 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)" },
 
        // mobility version of original Radeon (based on VE), now called M6
-       { DEVICE_ID_RADEON_LY   ,       rt_rv100,       ISMOBILITY,     "Radeon 
Mobility" },
-       { DEVICE_ID_RADEON_LZ   ,       rt_rv100,       ISMOBILITY,     "Radeon 
Mobility M6 LZ" },
+       { DEVICE_ID_RADEON_LY, rt_rv100, ISMOBILITY, "Radeon Mobility" },
+       { DEVICE_ID_RADEON_LZ, rt_rv100, ISMOBILITY, "Radeon Mobility M6 LZ" },
 
        // RV200 (dual CRT)
-       { 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_QW, rt_rv200, STD_RADEON, "Radeon 7500 / 
ALL-IN-WONDER Radeon 7500" },
+       { DEVICE_ID_RADEON_QX, rt_rv200, STD_RADEON, "Radeon 7500 QX" },
 
-       // M7 (based on RV200) was rt_m7
-       { DEVICE_ID_RADEON_LW   ,       rt_rv200,       ISMOBILITY,     "Radeon 
Mobility 7500" },
-       { DEVICE_ID_RADEON_LX   ,       rt_rv200,       ISMOBILITY,     "Radeon 
Mobility 7500 GL" },
+       // M7 (based on RV200) was rt_m 7
+       { DEVICE_ID_RADEON_LW, rt_rv200, ISMOBILITY, "Radeon Mobility 7500" },
+       { DEVICE_ID_RADEON_LX, rt_rv200, ISMOBILITY, "Radeon Mobility 7500 GL" 
},
 
        // R200
-       { DEVICE_ID_RADEON_QH   ,       rt_r200,        STD_RADEON,     "Fire 
GL E1" }, // chip type: fgl8800
-       { 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_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_QM   ,       rt_r200,        STD_RADEON,     "Radeon 
9100" },
+       { 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_QJ, rt_r200, STD_RADEON, "Radeon 8500 QJ" },
+       { 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_QM, rt_r200, STD_RADEON, "Radeon 9100" },
 
-       { 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_Qj   ,       rt_r200,        STD_RADEON,     "Radeon 
8500 Qj" },
-       { DEVICE_ID_RADEON_Qk   ,       rt_r200,        STD_RADEON,     "Radeon 
8500 Qk" },
+       { 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_Qj, rt_r200, STD_RADEON, "Radeon 8500 Qj" },
+       { 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_BC   ,       rt_r200,        STD_RADEON,     
"ALL-IN-Wonder Radeon 8500 DV (BC)" },
+       { 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)" },
 
        // RV250 (cut-down R200 with integrated TV-Out)
-       { DEVICE_ID_RADEON_If   ,  rt_rv250,    STD_RADEON,     "Radeon 9000" },
-       { DEVICE_ID_RADEON_Ig   ,  rt_rv250,    STD_RADEON,     "Radeon 9000 
Ig" },
+       { DEVICE_ID_RADEON_If, rt_rv250, STD_RADEON, "Radeon 9000" },
+       { DEVICE_ID_RADEON_Ig, rt_rv250, STD_RADEON, "Radeon 9000 Ig" },
 
        // M9 (based on rv250) was rt_m9
-       { 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_Lf   ,       rt_rv250,       ISMOBILITY,     "Radeon 
Mobility 9000 Lf" },
-       { DEVICE_ID_RADEON_Lg   ,       rt_rv250,       ISMOBILITY,     "Radeon 
Mobility 9000 Lg" },
+       { 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_Lf, rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Lf" 
},
+       { DEVICE_ID_RADEON_Lg, rt_rv250, ISMOBILITY, "Radeon Mobility 9000 Lg" 
},
 
        // RV280 (rv250 but faster)
-       { DEVICE_ID_RADEON_5960 ,       rt_rv280,       STD_RADEON,     "Radeon 
9200 Pro" },
-       { DEVICE_ID_RADEON_Za   ,       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_Ze   ,       rt_rv280,       STD_RADEON,     "Ati 
FireMV 2200" },
+       { DEVICE_ID_RADEON_5960, rt_rv280, STD_RADEON, "Radeon 9200 Pro" },
+       { DEVICE_ID_RADEON_Za, 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_Ze, rt_rv280, STD_RADEON, "Ati FireMV 2200" },
 
        // M9+ (based on rv280) was rt_m9plus
-       { DEVICE_ID_RADEON_5c61 ,       rt_rv280,       ISMOBILITY,     "Radeon 
Mobility 9200" },
-       { DEVICE_ID_RADEON_5c63 ,       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" },
 
        // R300
-       { 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_NF   ,       rt_r300,        STD_RADEON,     "Radeon 
9600 XT" },
-       { DEVICE_ID_RADEON_NG   ,       rt_r300,        STD_RADEON,     "Radeon 
9700 NG" },
+       { 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_NF, rt_r300, STD_RADEON, "Radeon 9600 XT" },
+       { DEVICE_ID_RADEON_NG, rt_r300, STD_RADEON, "Radeon 9700 NG" },
 
        // r300-4P
-       { 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_AF   ,       rt_r300,        STD_RADEON,     "Radeon 
9700 AF" },
-       { DEVICE_ID_RADEON_AG   ,       rt_r300,        STD_RADEON,     "Radeon 
9700 AG" },
+       { 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_AF, rt_r300, STD_RADEON, "Radeon 9700 AF" },
+       { DEVICE_ID_RADEON_AG, rt_r300, STD_RADEON, "Radeon 9700 AG" },
 
        // RV350
-       { 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_AR   ,       rt_rv350,       STD_RADEON,     "Radeon 
9600XT AR" },
-       { 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_4155 ,       rt_rv350,       STD_RADEON,     "Radeon 
9650 4155" },
-       { DEVICE_ID_RADEON_AV   ,       rt_rv350,       STD_RADEON,     "Radeon 
9600 AQ" },
+       { 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_AR, rt_rv350, STD_RADEON, "Radeon 9600XT AR" },
+       { 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_4155, rt_rv350, STD_RADEON, "Radeon 9650 4155" },
+       { DEVICE_ID_RADEON_AV, rt_rv350, STD_RADEON, "Radeon 9600 AQ" },
 
        // 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_NQ   ,       rt_rv350,       ISMOBILITY,     "Radeon 
Mobility 9600 (M10) NQ " },
-       { 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_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_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_NR, rt_rv350, ISMOBILITY, "Radeon Mobility 9600 
(M11) NR " },
+       { 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_NV, rt_rv350, ISMOBILITY, "ATI FireGL Mobility T2e 
(M11) NV" },
 
        // R350
-       { 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_AJ   ,       rt_r350,        STD_RADEON,     "Radeon 
9800 AJ" },
-       { 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_NI   ,       rt_r350,        STD_RADEON,     "Radeon 
9800 NI" },
-       { 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_AH, rt_r350, STD_RADEON, "Radeon 9800SE AH" },
+       { 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_AK, rt_r350, STD_RADEON, "FireGL X2 AK" },
+       { 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_NK, rt_r350, STD_RADEON, "FireGL X2 NK" },
+       { DEVICE_ID_RADEON_NJ, rt_r350, STD_RADEON, "Radeon 9800 XT" },
 
        // rv370
-       { 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_5b63 ,       rt_rv380,       STD_RADEON,     "Radeon 
X1050 (RV370) 5B63" },
-       { 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_5460 ,       rt_rv380,       ISMOBILITY,     "Radeon 
Mobility M300 (M22) 5460" },
-       { DEVICE_ID_RADEON_5464 ,       rt_rv380,       ISMOBILITY,     "FireGL 
M22 GL 5464" },
+       { 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_5b63, rt_rv380, STD_RADEON, "Radeon X1050 (RV370) 
5B63" },
+       { 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_5460, rt_rv380, ISMOBILITY, "Radeon Mobility M300 
(M22) 5460" },
+       { DEVICE_ID_RADEON_5464, rt_rv380, ISMOBILITY, "FireGL M22 GL 5464" },
 
        // rv380
-       { 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_3150 ,       rt_rv380,       ISMOBILITY,     "Radeon 
Mobility X600 (M24) 3150" },
-       { 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_3e50, rt_rv380, STD_RADEON, "Radeon X600 (RV380) 
3E50" },
+       { 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_3154, rt_rv380, ISMOBILITY, "FireGL M24 GL 3154" },
+       { DEVICE_ID_RADEON_5462, rt_rv380, ISMOBILITY, "Radeon X600SE (RV3?0) 
5462" },
 
        // rv380
-       { DEVICE_ID_RADEON_5b62  ,      rt_rv380,       STD_RADEON,     "Radeon 
X600 AIW" },
+       { DEVICE_ID_RADEON_5b62, rt_rv380, STD_RADEON, "Radeon X600 AIW" },
 
        // 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_564b ,       rt_r420,        ISMOBILITY,     
"Mobility FireGL V5000 (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_5653 ,       rt_r420,        ISMOBILITY,     
"Mobility Radeon X700 (M26)" },
-       { 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_5e4d ,       rt_r420,        STD_RADEON,     "Radeon 
X700 (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_5e48, rt_r420, STD_RADEON, "FireGL V5000 (RV410)" },
+       { 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_564f, rt_r420, ISMOBILITY, "Mobility Radeon X700 XL 
(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_5e4b, rt_r420, STD_RADEON, "Radeon X700 PRO (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_5e4c, rt_r420, STD_RADEON, "Radeon X700 SE (RV410)" 
},
+       { DEVICE_ID_RADEON_5e4f, rt_r420, STD_RADEON, "Radeon X700 SE (RV410)" 
},
 
        // r420
-       { 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_JJ   ,       rt_r420,        STD_RADEON,     "Radeon 
X800SE (R420) JJ" },
-       { 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_JM   ,       rt_r420,        STD_RADEON,     "FireGL 
X3 (R420) JM" },
-       { 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_4a4f ,       rt_r420,        STD_RADEON,     "Radeon 
X800 SE (R420)" },
+       { 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_JJ, rt_r420, STD_RADEON, "Radeon X800SE (R420) JJ" },
+       { 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_JM, rt_r420, STD_RADEON, "FireGL X3 (R420) JM" },
+       { 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_4a4f, rt_r420, STD_RADEON, "Radeon X800 SE (R420)" },
 
        // r423
-       { 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_UJ   ,       rt_r420,        STD_RADEON,     "Radeon 
X800LE (R423) UJ" },
-       { 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_UR   ,       rt_r420,        STD_RADEON,     "FireGL 
V5100 (R423) UR" },
-       { DEVICE_ID_RADEON_UT   ,       rt_r420,        STD_RADEON,     "FireGL 
V7100 (R423) UT" },
+       { 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_UJ, rt_r420, STD_RADEON, "Radeon X800LE (R423) UJ" },
+       { 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_UR, rt_r420, STD_RADEON, "FireGL V5100 (R423) UR" },
+       { 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_UM   ,       rt_r420,        STD_RADEON,     "Radeon 
X800 UM" },
+       { 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_5d57 ,       rt_r420,        STD_RADEON,     "Radeon 
X800 XT" },
-       { DEVICE_ID_RADEON_5550 ,       rt_r420,        STD_RADEON,     "FireGL 
V7100 (R423)" },
+       { DEVICE_ID_RADEON_5d57, rt_r420, STD_RADEON, "Radeon X800 XT" },
+       { DEVICE_ID_RADEON_5550, rt_r420, STD_RADEON, "FireGL V7100 (R423)" },
 
        // r430
-       { 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_5d48 ,       rt_r420,        ISMOBILITY,     
"Mobility Radeon X800 XT (M28)" },
-       { 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_554e ,       rt_r420,        STD_RADEON,     "Radeon 
X800 SE (R430)" },
-       { DEVICE_ID_RADEON_554c ,       rt_r420,        STD_RADEON,     "Radeon 
X800 XTP (R430)" },
+       { 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_5d48, rt_r420, ISMOBILITY, "Mobility Radeon X800 XT 
(M28)" },
+       { 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_554e, rt_r420, STD_RADEON, "Radeon X800 SE (R430)" },
+       { DEVICE_ID_RADEON_554c, rt_r420, STD_RADEON, "Radeon X800 XTP (R430)" 
},
 
        // r480
-       { 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_5d4e ,       rt_r420,        STD_RADEON,     "Radeon 
X850 SE (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_5d4d ,       rt_r420,        STD_RADEON,     "Radeon 
X850 XT PE (R480)" },
+       { 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_5d4e, rt_r420, STD_RADEON, "Radeon X850 SE (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_5d4d, rt_r420, STD_RADEON, "Radeon X850 XT PE 
(R480)" },
 
        // r481
-       { 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_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_KJ, rt_r420, STD_RADEON, "Radeon X850 PRO (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_KI, rt_r420, STD_RADEON, "Radeon X850 XT PE (R480)" 
},
 
        // rs100 (aka IGP 320)
-       { 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_4136, rt_rs100, INTEGRATED, "Radeon IGP320 (A3) 4136" 
},
+       { DEVICE_ID_RS100_4336, rt_rs100, MOBILE_IGP, "Radeon IGP320M (U1) 
4336" },
 
        // rs200 (aka IGP 340)
-       { 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_4137, rt_rs200, INTEGRATED, "Radeon IGP330/340/350 
(A4) 4137" },
+       { DEVICE_ID_RS200_4337, rt_rs200, MOBILE_IGP, "Radeon IGP330M/340M/350M 
(U2) 4337" },
 
        // rs250 (aka 7000 IGP)
-       { 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_4237, rt_rs200, INTEGRATED, "IGP330M/340M/350M (U2) 
4337" },
+       { DEVICE_ID_RS250_4437, rt_rs200, MOBILE_IGP, "Radeon Mobility 7000 IGP 
4437" },
 
        // rs300
-       { 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_5834, rt_rs300, INTEGRATED, "Radeon 9100 IGP (A5) 
5834" },
+       { DEVICE_ID_RS300_5835, rt_rs300, MOBILE_IGP, "Radeon Mobility 9100 IGP 
(U3) 5835" },
 
        // rs350
-       { 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_7834, rt_rs300, INTEGRATED, "Radeon 9100 PRO IGP 
7834" },
+       { DEVICE_ID_RS350_7835, rt_rs300, MOBILE_IGP, "Radeon Mobility 9200 IGP 
7835" },
 
        // 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_5a42  ,       rt_rv380,       ISMOBILITY,     "Radeon 
XPRESS 200M 5A42" },
+       { 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" 
},
 
        // 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_5a62  ,       rt_rv380,       ISMOBILITY,     "Radeon 
XPRESS 200M 5A62" },
+       { 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" 
},
 
        // 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_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_5975  ,       rt_rv380,       ISMOBILITY,     "Radeon 
XPRESS 200M 5975" },
+       { 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_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" 
},
 
        { 0, 0, 0, NULL }
 };
@@ -480,31 +480,32 @@
 };
 
 // check, whether there is *any* supported card plugged in
-bool Radeon_CardDetect( void )
+bool Radeon_CardDetect(void)
 {
        long            pci_index = 0;
        pci_info        pcii;
        bool            found_one = FALSE;
-       
+
        if (get_module(B_PCI_MODULE_NAME, (module_info **)&pci_bus) != B_OK)
                return B_ERROR;
 
        while ((*pci_bus->get_nth_pci_info)(pci_index, &pcii) == B_NO_ERROR) {
                int vendor = 0;
-               
+
                while (SupportedVendors[vendor].vendor_id) {
                        if (SupportedVendors[vendor].vendor_id == 
pcii.vendor_id) {
                                RadeonDevice *devices = 
SupportedVendors[vendor].devices;
-                               
+
                                while (devices->device_id) {
-                                       if (devices->device_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 );
+                                               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;
                                                        goto done;
                                                }
@@ -517,14 +518,15 @@
 
                pci_index++;
        }
-       SHOW_INFO0( 0, "no supported devices found" );
+       SHOW_INFO0(0, "no supported devices found");
 
 done:
        put_module(B_PCI_MODULE_NAME);
-       
+
        return (found_one ? B_OK : B_ERROR);
 }
 
+
 // !extend this array whenever a new ASIC is a added!
 static struct {
        const char              *name;                  // name of ASIC
@@ -534,41 +536,42 @@
        bool                    new_pll;                // reference divider of 
PPLL moved to other location
 } asic_properties[] =
 {
-       { "r100",       tc_external_rt1,        false,  true,   false,},
-       { "rv100",      tc_internal_rt1,        true,   true,   false,},
-       { "rs100",      tc_internal_rt1,        true,   false,  false,},
-       { "rv200",      tc_internal_rt2,        true,   true,   false,},
-       { "rs200",      tc_internal_rt1,        true,   false,  false,},
-       { "r200",       tc_external_rt1,        true,   true,   false,},
-       { "rv250",      tc_internal_rt2,        true,   true,   false,},
-       { "rs300",      tc_internal_rt1,        true,   false,  false,},
-       { "rv280",      tc_internal_rt2,        true,   true,   false,},
-       { "r300",       tc_internal_rt2,        true,   true,   true, },
-       { "r350",       tc_internal_rt2,        true,   true,   true, },
-       { "rv350",      tc_internal_rt2,        true,   true,   true, },
-       { "rv380",      tc_internal_rt2,        true,   true,   true, },
-       { "r420",       tc_internal_rt2,        true,   true,   true, }
+       { "r100",       tc_external_rt1,        false,  true,   false},
+       { "rv100",      tc_internal_rt1,        true,   true,   false},
+       { "rs100",      tc_internal_rt1,        true,   false,  false},
+       { "rv200",      tc_internal_rt2,        true,   true,   false},
+       { "rs200",      tc_internal_rt1,        true,   false,  false},
+       { "r200",       tc_external_rt1,        true,   true,   false},
+       { "rv250",      tc_internal_rt2,        true,   true,   false},
+       { "rs300",      tc_internal_rt1,        true,   false,  false},
+       { "rv280",      tc_internal_rt2,        true,   true,   false},
+       { "r300",       tc_internal_rt2,        true,   true,   true },
+       { "r350",       tc_internal_rt2,        true,   true,   true },
+       { "rv350",      tc_internal_rt2,        true,   true,   true },
+       { "rv380",      tc_internal_rt2,        true,   true,   true },
+       { "r420",       tc_internal_rt2,        true,   true,   true }
 
 };
 
 
 // get next supported device
-static bool probeDevice( device_info *di )
+static bool probeDevice(device_info *di)
 {
        int 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;
 
-               if( SupportedVendors[vendor].vendor_id != di->pcii.vendor_id ) 
+               if (SupportedVendors[vendor].vendor_id != di->pcii.vendor_id)
                        continue;
-                       
-               for( device = SupportedVendors[vendor].devices; 
device->device_id; ++device ) {
+
+               for (device = SupportedVendors[vendor].devices; 
device->device_id;
+                       ++device) {
                        // avoid double-detection
-                       if (device->device_id != di->pcii.device_id ) 
+                       if (device->device_id != di->pcii.device_id)
                                continue;
-                       
+
                        di->num_crtc = asic_properties[device->asic].has_crtc2 
? 2 : 1;
                        di->tv_chip = asic_properties[device->asic].tv_chip;
                        di->asic = device->asic;
@@ -576,11 +579,11 @@
                        di->has_vip = asic_properties[device->asic].has_vip;
                        di->new_pll = asic_properties[device->asic].new_pll;
                        di->is_igp = (device->features & INTEGRATED) ? true : 
false;
-               
+
                        // 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_LW:
                                case DEVICE_ID_RADEON_LX:
@@ -588,33 +591,33 @@
                                case DEVICE_ID_RADEON_Ig:
                                case DEVICE_ID_RADEON_5460:
                                case DEVICE_ID_RADEON_5464:
-                               di->has_no_i2c = true;
+                                       di->has_no_i2c = true;
+                                       break;
                                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
-                       // treated same asic as r420s in code, and the AGP x800 
works fine. 
-                       switch ( device->device_id )
+                       // treated same asic as r420s in code, and the AGP x800 
works fine.
+                       switch (device->device_id)
                        {
-                               // rv370                   
+                               // rv370
                                case DEVICE_ID_RADEON_5b60:
                                case DEVICE_ID_RADEON_5b62:
                                case DEVICE_ID_RADEON_5b64:
                                case DEVICE_ID_RADEON_5b65:
                                case DEVICE_ID_RADEON_5460:
                                case DEVICE_ID_RADEON_5464:
-                                                          
-                               // rv380                   
+
+                               // rv380
                                case DEVICE_ID_RADEON_3e50:
                                case DEVICE_ID_RADEON_3e54:
                                case DEVICE_ID_RADEON_3150:
                                case DEVICE_ID_RADEON_3154:
                                case DEVICE_ID_RADEON_5462:
-                                                          
-                               // rv410                   
+
+                               // rv410
                                case DEVICE_ID_RADEON_5e48:
                                case DEVICE_ID_RADEON_564a:
                                case DEVICE_ID_RADEON_564b:
@@ -627,51 +630,53 @@
                                case DEVICE_ID_RADEON_5e4c:
                                case DEVICE_ID_RADEON_5e4f:
 
-                               // rs400                  
+                               // rs400
                                case DEVICE_ID_RS400_5a41:
                                case DEVICE_ID_RS400_5a42:
-                                                         
-                               // rs410                  
+
+                               // rs410
                                case DEVICE_ID_RS410_5a61:
                                case DEVICE_ID_RS410_5a62:
+
                                // r430
-                               case DEVICE_ID_RADEON_UM:                       
          
-                               // rs480                  
+                               case DEVICE_ID_RADEON_UM:
+
+                               // rs480
                                case DEVICE_ID_RS480_5954:
                                case DEVICE_ID_RS480_5955:
                                case DEVICE_ID_RS482_5974:
                                case DEVICE_ID_RS482_5975:
-
                                        di->acc_dma = false;
                                        break;
                                default:
                                        di->acc_dma = true;
                                        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
                                return false;
-                               
-                       if( Radeon_ReadBIOSData( di ) != B_OK ) {
-                               Radeon_UnmapBIOS( &di->rom );
+
+                       if (Radeon_ReadBIOSData(di) != B_OK) {
+                               Radeon_UnmapBIOS(&di->rom);
                                return false;
                        }
 
                        // we don't need BIOS any more
-                       Radeon_UnmapBIOS( &di->rom );
-                       
-                       SHOW_INFO( 0, "found %s; ASIC: %s", device->name, 
asic_properties[device->asic].name );
-                       
+                       Radeon_UnmapBIOS(&di->rom);
+
+                       SHOW_INFO(0, "found %s; ASIC: %s", device->name,
+                               asic_properties[device->asic].name);
+
                        sprintf(di->name, "graphics/%04X_%04X_%02X%02X%02X",
                                di->pcii.vendor_id, di->pcii.device_id,
                                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
-                       // Theater, but the corresponding code (vip.c) needs a 
fully initialized
-                       // driver, and this is too much hazzly, so we leave it 
to the media add-on
-                       // to verify that the card really supports video-in
+                       // Theater, but the corresponding code (vip.c) needs a 
fully
+                       // initialized driver, and this is too much hazzly, so 
we leave it
+                       // to the media add-on to verify that the card supports 
video-in
                        sprintf(di->video_name, 
"video/radeon/%04X_%04X_%02X%02X%02X",
                                di->pcii.vendor_id, di->pcii.device_id,
                                di->pcii.bus, di->pcii.device, 
di->pcii.function);
@@ -679,11 +684,11 @@
                        di->is_open = 0;
                        di->shared_area = -1;
                        di->si = NULL;
-       
+
                        return true;
                }
        }
-       
+
        return false;
 }
 
@@ -692,30 +697,30 @@
 // (currently, we rely on proper BIOS detection, which
 //  only works for primary graphics adapter, so multiple
 //  devices won't really work)
-void Radeon_ProbeDevices( void ) 
+void Radeon_ProbeDevices(void)
 {
        uint32 pci_index = 0;
        uint32 count = 0;
        device_info *di = devices->di;
 
-       while( count < MAX_DEVICES ) {
-               memset( di, 0, sizeof( *di ));
-               
-               if( (*pci_bus->get_nth_pci_info)(pci_index, &(di->pcii)) != 
B_NO_ERROR)
+       while (count < MAX_DEVICES) {
+               memset(di, 0, sizeof(*di));
+
+               if ((*pci_bus->get_nth_pci_info)(pci_index, &(di->pcii)) != 
B_NO_ERROR)
                        break;
-                       
-               if( probeDevice( di )) {
-                       devices->device_names[2*count] = di->name;
-                       devices->device_names[2*count+1] = di->video_name;
+
+               if (probeDevice(di)) {
+                       devices->device_names[2 * count] = di->name;
+                       devices->device_names[2 * count + 1] = di->video_name;
                        di++;
                        count++;
                }
 
                pci_index++;
        }
-       
+
        devices->count = count;
-       devices->device_names[2*count] = NULL;
-       
-       SHOW_INFO( 0, "%ld supported devices", count );
+       devices->device_names[2 * count] = NULL;
+
+       SHOW_INFO(0, "%ld supported devices", count);
 }


Other related posts: