diff options
author | Dave Airlie <airlied@linux.ie> | 2004-08-17 12:04:58 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-08-17 12:04:58 +0000 |
commit | 15026ddc3cbb831343a53fc33f4d4cbeea3e4f98 (patch) | |
tree | 340f67a5bc3d400c0ef0a1ee00f162c54c638331 /shared-core | |
parent | 05c724faee6dbff27a6a573adc77bd22015444b4 (diff) |
merge trunk to branchdrmfntbl-0-0-1-170804
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/drm_pciids.txt | 338 | ||||
-rw-r--r-- | shared-core/radeon_cp.c | 165 | ||||
-rw-r--r-- | shared-core/radeon_drm.h | 2 | ||||
-rw-r--r-- | shared-core/radeon_drv.h | 31 | ||||
-rw-r--r-- | shared-core/radeon_state.c | 3 | ||||
-rw-r--r-- | shared-core/sis_drv.h | 3 | ||||
-rw-r--r-- | shared-core/via_drv.h | 4 |
7 files changed, 318 insertions, 228 deletions
diff --git a/shared-core/drm_pciids.txt b/shared-core/drm_pciids.txt index 6eb05693..0b97b223 100644 --- a/shared-core/drm_pciids.txt +++ b/shared-core/drm_pciids.txt @@ -1,195 +1,195 @@ [radeon] -0x1002 0x4136 "ATI Radeon RS100 IGP 320M" -0x1002 0x4137 "ATI Radeon RS200 IGP" -0x1002 0x4237 "ATI Radeon RS250 IGP" -0x1002 0x4242 "ATI Radeon BB R200 AIW 8500DV" -0x1002 0x4242 "ATI Radeon BC R200" -0x1002 0x4336 "ATI Radeon RS100 Mobility U1" -0x1002 0x4337 "ATI Radeon RS200 Mobility IGP 340M" -0x1002 0x4437 "ATI Radeon RS250 Mobility IGP" -0x1002 0x4964 "ATI Radeon Id R250 9000" -0x1002 0x4965 "ATI Radeon Ie R250 9000" -0x1002 0x4966 "ATI Radeon If R250 9000" -0x1002 0x4967 "ATI Radeon Ig R250 9000" -0x1002 0x4C57 "ATI Radeon LW Mobility 7500 M7" -0x1002 0x4C58 "ATI Radeon LX RV200 Mobility FireGL 7800 M7" -0x1002 0x4C59 "ATI Radeon LY Mobility M6" -0x1002 0x4C5A "ATI Radeon LZ Mobility M6" -0x1002 0x4C64 "ATI Radeon Ld R250 Mobility 9000 M9" -0x1002 0x4C65 "ATI Radeon Le R250 Mobility 9000 M9" -0x1002 0x4C66 "ATI Radeon Lf R250 Mobility 9000 M9" -0x1002 0x4C67 "ATI Radeon Lg R250 Mobility 9000 M9" -0x1002 0x5144 "ATI Radeon QD R100" -0x1002 0x5145 "ATI Radeon QE R100" -0x1002 0x5146 "ATI Radeon QF R100" -0x1002 0x5147 "ATI Radeon QG R100" -0x1002 0x5148 "ATI Radeon QH R200 8500" -0x1002 0x5149 "ATI Radeon QI R200" -0x1002 0x514A "ATI Radeon QJ R200" -0x1002 0x514B "ATI Radeon QK R200" -0x1002 0x514C "ATI Radeon QL R200 8500 LE" -0x1002 0x514D "ATI Radeon QM R200 9100" -0x1002 0x514E "ATI Radeon QN R200 8500 LE" -0x1002 0x514F "ATI Radeon QO R200 8500 LE" -0x1002 0x5157 "ATI Radeon QW RV200 7500" -0x1002 0x5158 "ATI Radeon QX RV200 7500" -0x1002 0x5159 "ATI Radeon QY RV100 7000/VE" -0x1002 0x515A "ATI Radeon QZ RV100 7000/VE" -0x1002 0x5168 "ATI Radeon Qh R200" -0x1002 0x5169 "ATI Radeon Qi R200" -0x1002 0x516A "ATI Radeon Qj R200" -0x1002 0x516B "ATI Radeon Qk R200" -0x1002 0x516C "ATI Radeon Ql R200" -0x1002 0x5834 "ATI Radeon RS300 IGP" -0x1002 0x5835 "ATI Radeon RS300 Mobility IGP" -0x1002 0x5836 "ATI Radeon RS300 IGP" -0x1002 0x5837 "ATI Radeon RS300 IGP" -0x1002 0x5960 "ATI Radeon RV280 9200" -0x1002 0x5961 "ATI Radeon RV280 9200 SE" -0x1002 0x5962 "ATI Radeon RV280 9200" -0x1002 0x5963 "ATI Radeon RV280 9200" -0x1002 0x5964 "ATI Radeon RV280 9200 SE" -0x1002 0x5968 "ATI Radeon RV280 9200" -0x1002 0x5969 "ATI Radeon RV280 9200" -0x1002 0x596A "ATI Radeon RV280 9200" -0x1002 0x596B "ATI Radeon RV280 9200" -0x1002 0x5c61 "ATI Radeon RV280 Mobility" -0x1002 0x5c62 "ATI Radeon RV280" -0x1002 0x5c63 "ATI Radeon RV280 Mobility" -0x1002 0x5c64 "ATI Radeon RV280" +0x1002 0x4136 CHIP_IS_IGP "ATI Radeon RS100 IGP 320M" +0x1002 0x4137 CHIP_IS_IGP "ATI Radeon RS200 IGP" +0x1002 0x4237 CHIP_IS_IGP "ATI Radeon RS250 IGP" +0x1002 0x4242 0 "ATI Radeon BB R200 AIW 8500DV" +0x1002 0x4242 0 "ATI Radeon BC R200" +0x1002 0x4336 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS100 Mobility U1" +0x1002 0x4337 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS200 Mobility IGP 340M" +0x1002 0x4437 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS250 Mobility IGP" +0x1002 0x4964 0 "ATI Radeon Id R250 9000" +0x1002 0x4965 0 "ATI Radeon Ie R250 9000" +0x1002 0x4966 0 "ATI Radeon If R250 9000" +0x1002 0x4967 0 "ATI Radeon Ig R250 9000" +0x1002 0x4C57 CHIP_IS_MOBILITY "ATI Radeon LW Mobility 7500 M7" +0x1002 0x4C58 CHIP_IS_MOBILITY "ATI Radeon LX RV200 Mobility FireGL 7800 M7" +0x1002 0x4C59 CHIP_IS_MOBILITY "ATI Radeon LY Mobility M6" +0x1002 0x4C5A CHIP_IS_MOBILITY "ATI Radeon LZ Mobility M6" +0x1002 0x4C64 CHIP_IS_MOBILITY "ATI Radeon Ld R250 Mobility 9000 M9" +0x1002 0x4C65 CHIP_IS_MOBILITY "ATI Radeon Le R250 Mobility 9000 M9" +0x1002 0x4C66 CHIP_IS_MOBILITY "ATI Radeon Lf R250 Mobility 9000 M9" +0x1002 0x4C67 CHIP_IS_MOBILITY "ATI Radeon Lg R250 Mobility 9000 M9" +0x1002 0x5144 CHIP_SINGLE_CRTC "ATI Radeon QD R100" +0x1002 0x5145 CHIP_SINGLE_CRTC "ATI Radeon QE R100" +0x1002 0x5146 CHIP_SINGLE_CRTC "ATI Radeon QF R100" +0x1002 0x5147 CHIP_SINGLE_CRTC "ATI Radeon QG R100" +0x1002 0x5148 0 "ATI Radeon QH R200 8500" +0x1002 0x5149 0 "ATI Radeon QI R200" +0x1002 0x514A 0 "ATI Radeon QJ R200" +0x1002 0x514B 0 "ATI Radeon QK R200" +0x1002 0x514C 0 "ATI Radeon QL R200 8500 LE" +0x1002 0x514D 0 "ATI Radeon QM R200 9100" +0x1002 0x514E 0 "ATI Radeon QN R200 8500 LE" +0x1002 0x514F 0 "ATI Radeon QO R200 8500 LE" +0x1002 0x5157 0 "ATI Radeon QW RV200 7500" +0x1002 0x5158 0 "ATI Radeon QX RV200 7500" +0x1002 0x5159 0 "ATI Radeon QY RV100 7000/VE" +0x1002 0x515A 0 "ATI Radeon QZ RV100 7000/VE" +0x1002 0x5168 0 "ATI Radeon Qh R200" +0x1002 0x5169 0 "ATI Radeon Qi R200" +0x1002 0x516A 0 "ATI Radeon Qj R200" +0x1002 0x516B 0 "ATI Radeon Qk R200" +0x1002 0x516C 0 "ATI Radeon Ql R200" +0x1002 0x5834 CHIP_IS_IGP "ATI Radeon RS300 IGP" +0x1002 0x5835 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS300 Mobility IGP" +0x1002 0x5836 CHIP_IS_IGP "ATI Radeon RS300 IGP" +0x1002 0x5837 CHIP_IS_IGP "ATI Radeon RS300 IGP" +0x1002 0x5960 0 "ATI Radeon RV280 9200" +0x1002 0x5961 0 "ATI Radeon RV280 9200 SE" +0x1002 0x5962 0 "ATI Radeon RV280 9200" +0x1002 0x5963 0 "ATI Radeon RV280 9200" +0x1002 0x5964 0 "ATI Radeon RV280 9200 SE" +0x1002 0x5968 0 "ATI Radeon RV280 9200" +0x1002 0x5969 0 "ATI Radeon RV280 9200" +0x1002 0x596A 0 "ATI Radeon RV280 9200" +0x1002 0x596B 0 "ATI Radeon RV280 9200" +0x1002 0x5c61 CHIP_IS_MOBILITY "ATI Radeon RV280 Mobility" +0x1002 0x5c62 0 "ATI Radeon RV280" +0x1002 0x5c63 CHIP_IS_MOBILITY "ATI Radeon RV280 Mobility" +0x1002 0x5c64 0 "ATI Radeon RV280" [r128] -0x1002 0x4c45 "ATI Rage 128 Mobility LE (PCI)" -0x1002 0x4c46 "ATI Rage 128 Mobility LF (AGP)" -0x1002 0x4d46 "ATI Rage 128 Mobility MF (AGP)" -0x1002 0x4d4c "ATI Rage 128 Mobility ML (AGP)" -0x1002 0x5041 "ATI Rage 128 Pro PA (PCI)" -0x1002 0x5042 "ATI Rage 128 Pro PB (AGP)" -0x1002 0x5043 "ATI Rage 128 Pro PC (AGP)" -0x1002 0x5044 "ATI Rage 128 Pro PD (PCI)" -0x1002 0x5045 "ATI Rage 128 Pro PE (AGP)" -0x1002 0x5046 "ATI Rage 128 Pro PF (AGP)" -0x1002 0x5047 "ATI Rage 128 Pro PG (PCI)" -0x1002 0x5048 "ATI Rage 128 Pro PH (AGP)" -0x1002 0x5049 "ATI Rage 128 Pro PI (AGP)" -0x1002 0x504A "ATI Rage 128 Pro PJ (PCI)" -0x1002 0x504B "ATI Rage 128 Pro PK (AGP)" -0x1002 0x504C "ATI Rage 128 Pro PL (AGP)" -0x1002 0x504D "ATI Rage 128 Pro PM (PCI)" -0x1002 0x504E "ATI Rage 128 Pro PN (AGP)" -0x1002 0x504F "ATI Rage 128 Pro PO (AGP)" -0x1002 0x5050 "ATI Rage 128 Pro PP (PCI)" -0x1002 0x5051 "ATI Rage 128 Pro PQ (AGP)" -0x1002 0x5052 "ATI Rage 128 Pro PR (PCI)" -0x1002 0x5053 "ATI Rage 128 Pro PS (PCI)" -0x1002 0x5054 "ATI Rage 128 Pro PT (AGP)" -0x1002 0x5055 "ATI Rage 128 Pro PU (AGP)" -0x1002 0x5056 "ATI Rage 128 Pro PV (PCI)" -0x1002 0x5057 "ATI Rage 128 Pro PW (AGP)" -0x1002 0x5058 "ATI Rage 128 Pro PX (AGP)" -0x1002 0x5245 "ATI Rage 128 RE (PCI)" -0x1002 0x5246 "ATI Rage 128 RF (AGP)" -0x1002 0x5247 "ATI Rage 128 RG (AGP)" -0x1002 0x524b "ATI Rage 128 RK (PCI)" -0x1002 0x524c "ATI Rage 128 RL (AGP)" -0x1002 0x534d "ATI Rage 128 SM (AGP)" -0x1002 0x5446 "ATI Rage 128 Pro Ultra TF (AGP)" -0x1002 0x544C "ATI Rage 128 Pro Ultra TL (AGP)" -0x1002 0x5452 "ATI Rage 128 Pro Ultra TR (AGP)" +0x1002 0x4c45 0 "ATI Rage 128 Mobility LE (PCI)" +0x1002 0x4c46 0 "ATI Rage 128 Mobility LF (AGP)" +0x1002 0x4d46 0 "ATI Rage 128 Mobility MF (AGP)" +0x1002 0x4d4c 0 "ATI Rage 128 Mobility ML (AGP)" +0x1002 0x5041 0 "ATI Rage 128 Pro PA (PCI)" +0x1002 0x5042 0 "ATI Rage 128 Pro PB (AGP)" +0x1002 0x5043 0 "ATI Rage 128 Pro PC (AGP)" +0x1002 0x5044 0 "ATI Rage 128 Pro PD (PCI)" +0x1002 0x5045 0 "ATI Rage 128 Pro PE (AGP)" +0x1002 0x5046 0 "ATI Rage 128 Pro PF (AGP)" +0x1002 0x5047 0 "ATI Rage 128 Pro PG (PCI)" +0x1002 0x5048 0 "ATI Rage 128 Pro PH (AGP)" +0x1002 0x5049 0 "ATI Rage 128 Pro PI (AGP)" +0x1002 0x504A 0 "ATI Rage 128 Pro PJ (PCI)" +0x1002 0x504B 0 "ATI Rage 128 Pro PK (AGP)" +0x1002 0x504C 0 "ATI Rage 128 Pro PL (AGP)" +0x1002 0x504D 0 "ATI Rage 128 Pro PM (PCI)" +0x1002 0x504E 0 "ATI Rage 128 Pro PN (AGP)" +0x1002 0x504F 0 "ATI Rage 128 Pro PO (AGP)" +0x1002 0x5050 0 "ATI Rage 128 Pro PP (PCI)" +0x1002 0x5051 0 "ATI Rage 128 Pro PQ (AGP)" +0x1002 0x5052 0 "ATI Rage 128 Pro PR (PCI)" +0x1002 0x5053 0 "ATI Rage 128 Pro PS (PCI)" +0x1002 0x5054 0 "ATI Rage 128 Pro PT (AGP)" +0x1002 0x5055 0 "ATI Rage 128 Pro PU (AGP)" +0x1002 0x5056 0 "ATI Rage 128 Pro PV (PCI)" +0x1002 0x5057 0 "ATI Rage 128 Pro PW (AGP)" +0x1002 0x5058 0 "ATI Rage 128 Pro PX (AGP)" +0x1002 0x5245 0 "ATI Rage 128 RE (PCI)" +0x1002 0x5246 0 "ATI Rage 128 RF (AGP)" +0x1002 0x5247 0 "ATI Rage 128 RG (AGP)" +0x1002 0x524b 0 "ATI Rage 128 RK (PCI)" +0x1002 0x524c 0 "ATI Rage 128 RL (AGP)" +0x1002 0x534d 0 "ATI Rage 128 SM (AGP)" +0x1002 0x5446 0 "ATI Rage 128 Pro Ultra TF (AGP)" +0x1002 0x544C 0 "ATI Rage 128 Pro Ultra TL (AGP)" +0x1002 0x5452 0 "ATI Rage 128 Pro Ultra TR (AGP)" [mga] -0x102b 0x0521 "Matrox G200 (AGP)" -0x102b 0x0525 "Matrox G400/G450 (AGP)" -0x102b 0x2527 "Matrox G550 (AGP)" +0x102b 0x0521 0 "Matrox G200 (AGP)" +0x102b 0x0525 0 "Matrox G400/G450 (AGP)" +0x102b 0x2527 0 "Matrox G550 (AGP)" [mach64] -0x1002 0x4749 "3D Rage Pro" -0x1002 0x4750 "3D Rage Pro 215GP" -0x1002 0x4751 "3D Rage Pro 215GQ" -0x1002 0x4742 "3D Rage Pro AGP 1X/2X" -0x1002 0x4744 "3D Rage Pro AGP 1X" -0x1002 0x4c49 "3D Rage LT Pro" -0x1002 0x4c50 "3D Rage LT Pro" -0x1002 0x4c51 "3D Rage LT Pro" -0x1002 0x4c42 "3D Rage LT Pro AGP-133" -0x1002 0x4c44 "3D Rage LT Pro AGP-66" -0x1002 0x474c "Rage XC" -0x1002 0x474f "Rage XL" -0x1002 0x4752 "Rage XL" -0x1002 0x4753 "Rage XC" -0x1002 0x474d "Rage XL AGP 2X" -0x1002 0x474e "Rage XC AGP" -0x1002 0x4c52 "Rage Mobility P/M" -0x1002 0x4c53 "Rage Mobility L" -0x1002 0x4c4d "Rage Mobility P/M AGP 2X" -0x1002 0x4c4e "Rage Mobility L AGP 2X" +0x1002 0x4749 0 "3D Rage Pro" +0x1002 0x4750 0 "3D Rage Pro 215GP" +0x1002 0x4751 0 "3D Rage Pro 215GQ" +0x1002 0x4742 0 "3D Rage Pro AGP 1X/2X" +0x1002 0x4744 0 "3D Rage Pro AGP 1X" +0x1002 0x4c49 0 "3D Rage LT Pro" +0x1002 0x4c50 0 "3D Rage LT Pro" +0x1002 0x4c51 0 "3D Rage LT Pro" +0x1002 0x4c42 0 "3D Rage LT Pro AGP-133" +0x1002 0x4c44 0 "3D Rage LT Pro AGP-66" +0x1002 0x474c 0 "Rage XC" +0x1002 0x474f 0 "Rage XL" +0x1002 0x4752 0 "Rage XL" +0x1002 0x4753 0 "Rage XC" +0x1002 0x474d 0 "Rage XL AGP 2X" +0x1002 0x474e 0 "Rage XC AGP" +0x1002 0x4c52 0 "Rage Mobility P/M" +0x1002 0x4c53 0 "Rage Mobility L" +0x1002 0x4c4d 0 "Rage Mobility P/M AGP 2X" +0x1002 0x4c4e 0 "Rage Mobility L AGP 2X" [sisdrv] -0x1039 0x0300 "SiS 300/305" -0x1039 0x5300 "SiS 540" -0x1039 0x6300 "SiS 630" -0x1039 0x7300 "SiS 730" +0x1039 0x0300 0 "SiS 300/305" +0x1039 0x5300 0 "SiS 540" +0x1039 0x6300 0 "SiS 630" +0x1039 0x7300 0 "SiS 730" [tdfx] -0x121a 0x0003 "3dfx Voodoo Banshee" -0x121a 0x0004 "3dfx Voodoo3 2000" -0x121a 0x0005 "3dfx Voodoo3 3000" -0x121a 0x0007 "3dfx Voodoo4 4500" -0x121a 0x0009 "3dfx Voodoo5 5500" -0x121a 0x000b "3dfx Voodoo4 4200" +0x121a 0x0003 0 "3dfx Voodoo Banshee" +0x121a 0x0004 0 "3dfx Voodoo3 2000" +0x121a 0x0005 0 "3dfx Voodoo3 3000" +0x121a 0x0007 0 "3dfx Voodoo4 4500" +0x121a 0x0009 0 "3dfx Voodoo5 5500" +0x121a 0x000b 0 "3dfx Voodoo4 4200" [viadrv] -0x1106 0x3022 "VIA CLE266 3022" -0x1106 0x3118 "VIA CN400" -0x1106 0x3122 "VIA CLE266" -0x1106 0x7205 "VIA KM400" -0x1106 0x7204 "VIA K8M800" +0x1106 0x3022 0 "VIA CLE266 3022" +0x1106 0x3118 0 "VIA CN400" +0x1106 0x3122 0 "VIA CLE266" +0x1106 0x7205 0 "VIA KM400" +0x1106 0x7204 0 "VIA K8M800" [i810] -0x8086 0x7121 "Intel i810 GMCH" -0x8086 0x7123 "Intel i810-DC100 GMCH" -0x8086 0x7125 "Intel i810E GMCH" -0x8086 0x1132 "Intel i815 GMCH" +0x8086 0x7121 0 "Intel i810 GMCH" +0x8086 0x7123 0 "Intel i810-DC100 GMCH" +0x8086 0x7125 0 "Intel i810E GMCH" +0x8086 0x1132 0 "Intel i815 GMCH" [i830] -0x8086 0x3577 "Intel i830M GMCH" -0x8086 0x2562 "Intel i845G GMCH" -0x8086 0x3582 "Intel i852GM/i855GM GMCH" -0x8086 0x2572 "Intel i865G GMCH" +0x8086 0x3577 0 "Intel i830M GMCH" +0x8086 0x2562 0 "Intel i845G GMCH" +0x8086 0x3582 0 "Intel i852GM/i855GM GMCH" +0x8086 0x2572 0 "Intel i865G GMCH" [gamma] -0x3d3d 0x0008 "3DLabs GLINT Gamma G1" +0x3d3d 0x0008 0 "3DLabs GLINT Gamma G1" [savage] -0x5333 0x8a22 "Savage4" -0x5333 0x8a23 "Savage4" -0x5333 0x8c10 "Savage/MX-MV" -0x5333 0x8c11 "Savage/MX" -0x5333 0x8c12 "Savage/IX-MV" -0x5333 0x8c13 "Savage/IX" -0x5333 0x8c20 "Savage 3D" -0x5333 0x8c21 "Savage 3D/MV" -0x5333 0x8c22 "SuperSavage MX/128" -0x5333 0x8c24 "SuperSavage MX/64" -0x5333 0x8c26 "SuperSavage MX/64C" -0x5333 0x8c2a "SuperSavage IX/128 SDR" -0x5333 0x8c2b "SuperSavage IX/128 DDR" -0x5333 0x8c2c "SuperSavage IX/64 SDR" -0x5333 0x8c2d "SuperSavage IX/64 DDR" -0x5333 0x8c2e "SuperSavage IX/C SDR" -0x5333 0x8c2f "SuperSavage IX/C DDR" -0x5333 0x8a25 "ProSavage PM133" -0x5333 0x8a26 "ProSavage KM133" -0x5333 0x8d01 "ProSavage PN133" -0x5333 0x8d02 "ProSavage KN133" -0x5333 0x8d04 "ProSavage DDR" +0x5333 0x8a22 0 "Savage4" +0x5333 0x8a23 0 "Savage4" +0x5333 0x8c10 0 "Savage/MX-MV" +0x5333 0x8c11 0 "Savage/MX" +0x5333 0x8c12 0 "Savage/IX-MV" +0x5333 0x8c13 0 "Savage/IX" +0x5333 0x8c20 0 "Savage 3D" +0x5333 0x8c21 0 "Savage 3D/MV" +0x5333 0x8c22 0 "SuperSavage MX/128" +0x5333 0x8c24 0 "SuperSavage MX/64" +0x5333 0x8c26 0 "SuperSavage MX/64C" +0x5333 0x8c2a 0 "SuperSavage IX/128 SDR" +0x5333 0x8c2b 0 "SuperSavage IX/128 DDR" +0x5333 0x8c2c 0 "SuperSavage IX/64 SDR" +0x5333 0x8c2d 0 "SuperSavage IX/64 DDR" +0x5333 0x8c2e 0 "SuperSavage IX/C SDR" +0x5333 0x8c2f 0 "SuperSavage IX/C DDR" +0x5333 0x8a25 0 "ProSavage PM133" +0x5333 0x8a26 0 "ProSavage KM133" +0x5333 0x8d01 0 "ProSavage PN133" +0x5333 0x8d02 0 "ProSavage KN133" +0x5333 0x8d04 0 "ProSavage DDR" [ffb] [i915] -0x8086 0x3577 "Intel i830M GMCH" -0x8086 0x2562 "Intel i845G GMCH" -0x8086 0x3582 "Intel i852GM/i855GM GMCH" -0x8086 0x2572 "Intel i865G GMCH" -0x8086 0x2582 "Intel i915G" +0x8086 0x3577 0 "Intel i830M GMCH" +0x8086 0x2562 0 "Intel i845G GMCH" +0x8086 0x3582 0 "Intel i852GM/i855GM GMCH" +0x8086 0x2572 0 "Intel i865G GMCH" +0x8086 0x2582 0 "Intel i915G" diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c index fc859825..f12e526e 100644 --- a/shared-core/radeon_cp.c +++ b/shared-core/radeon_cp.c @@ -859,7 +859,7 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev, | ( dev_priv->fb_location >> 16 ) ); #if __REALLY_HAVE_AGP - if ( !dev_priv->is_pci ) { + if (dev_priv->flags & CHIP_IS_AGP) { RADEON_WRITE( RADEON_MC_AGP_LOCATION, (((dev_priv->gart_vm_start - 1 + dev_priv->gart_size) & 0xffff0000) | @@ -868,7 +868,7 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev, ring_start = (dev_priv->cp_ring->offset - dev->agp->base + dev_priv->gart_vm_start); - } else + } else #endif ring_start = (dev_priv->cp_ring->offset - dev->sg->handle @@ -886,7 +886,9 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev, dev_priv->ring.tail = cur_read_ptr; #if __REALLY_HAVE_AGP - if ( !dev_priv->is_pci ) { + if (dev_priv->flags & CHIP_IS_AGP) { + /* set RADEON_AGP_BASE here instead of relying on X from user space */ + RADEON_WRITE( RADEON_AGP_BASE, (unsigned int)dev->agp->base ); RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR, dev_priv->ring_rptr->offset - dev->agp->base @@ -1003,20 +1005,11 @@ static void radeon_set_pcigart( drm_radeon_private_t *dev_priv, int on ) static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) { - drm_radeon_private_t *dev_priv; + drm_radeon_private_t *dev_priv = dev->dev_private; DRM_DEBUG( "\n" ); - dev_priv = DRM(alloc)( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER ); - if ( dev_priv == NULL ) - return DRM_ERR(ENOMEM); - - memset( dev_priv, 0, sizeof(drm_radeon_private_t) ); - - dev_priv->is_pci = init->is_pci; - - if ( dev_priv->is_pci && !dev->sg ) { + if ( (!(dev_priv->flags & CHIP_IS_AGP)) && !dev->sg ) { DRM_ERROR( "PCI GART memory not allocated!\n" ); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } @@ -1025,7 +1018,6 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) if ( dev_priv->usec_timeout < 1 || dev_priv->usec_timeout > RADEON_MAX_USEC_TIMEOUT ) { DRM_DEBUG( "TIMEOUT problem!\n" ); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } @@ -1041,7 +1033,6 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) if ( ( init->cp_mode != RADEON_CSQ_PRIBM_INDDIS ) && ( init->cp_mode != RADEON_CSQ_PRIBM_INDBM ) ) { DRM_DEBUG( "BAD cp_mode (%x)!\n", init->cp_mode ); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } @@ -1113,7 +1104,6 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) if(!dev_priv->sarea) { DRM_ERROR("could not find sarea!\n"); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } @@ -1121,28 +1111,24 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio) { DRM_ERROR("could not find mmio region!\n"); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } dev_priv->cp_ring = drm_core_findmap(dev, init->ring_offset); if(!dev_priv->cp_ring) { DRM_ERROR("could not find cp ring region!\n"); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset); if(!dev_priv->ring_rptr) { DRM_ERROR("could not find ring read pointer!\n"); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); if(!dev->agp_buffer_map) { DRM_ERROR("could not find dma buffer region!\n"); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } @@ -1151,7 +1137,6 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) dev_priv->gart_textures = drm_core_findmap(dev, init->gart_textures_offset); if ( !dev_priv->gart_textures ) { DRM_ERROR("could not find GART texture region!\n"); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } @@ -1162,7 +1147,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) init->sarea_priv_offset); #if __REALLY_HAVE_AGP - if ( !dev_priv->is_pci ) { + if ( dev_priv->flags & CHIP_IS_AGP ) { drm_core_ioremap( dev_priv->cp_ring, dev ); drm_core_ioremap( dev_priv->ring_rptr, dev ); drm_core_ioremap( dev->agp_buffer_map, dev ); @@ -1170,7 +1155,6 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) !dev_priv->ring_rptr->handle || !dev->agp_buffer_map->handle) { DRM_ERROR("could not find ioremap agp regions!\n"); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } @@ -1212,7 +1196,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) + RADEON_READ( RADEON_CONFIG_APER_SIZE ); #if __REALLY_HAVE_AGP - if ( !dev_priv->is_pci ) + if (dev_priv->flags & CHIP_IS_AGP) dev_priv->gart_buffers_offset = (dev->agp_buffer_map->offset - dev->agp->base + dev_priv->gart_vm_start); @@ -1241,7 +1225,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) dev_priv->ring.high_mark = RADEON_RING_HIGH_MARK; #if __REALLY_HAVE_AGP - if ( !dev_priv->is_pci ) { + if (dev_priv->flags & CHIP_IS_AGP) { /* Turn off PCI GART */ radeon_set_pcigart( dev_priv, 0 ); } else @@ -1250,7 +1234,6 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) if (!DRM(ati_pcigart_init)( dev, &dev_priv->phys_pci_gart, &dev_priv->bus_pci_gart)) { DRM_ERROR( "failed to init PCI GART!\n" ); - dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(ENOMEM); } @@ -1264,8 +1247,6 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) dev_priv->last_buf = 0; - dev->dev_private = (void *)dev_priv; - radeon_do_engine_reset( dev ); return 0; @@ -1273,6 +1254,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) int radeon_do_cleanup_cp( drm_device_t *dev ) { + drm_radeon_private_t *dev_priv = dev->dev_private; DRM_DEBUG( "\n" ); #if __HAVE_IRQ @@ -1283,29 +1265,27 @@ int radeon_do_cleanup_cp( drm_device_t *dev ) if ( dev->irq_enabled ) DRM(irq_uninstall)(dev); #endif - if ( dev->dev_private ) { - drm_radeon_private_t *dev_priv = dev->dev_private; - #if __REALLY_HAVE_AGP - if ( !dev_priv->is_pci ) { - if ( dev_priv->cp_ring != NULL ) - drm_core_ioremapfree( dev_priv->cp_ring, dev ); - if ( dev_priv->ring_rptr != NULL ) - drm_core_ioremapfree( dev_priv->ring_rptr, dev ); - if ( dev->agp_buffer_map != NULL ) - drm_core_ioremapfree( dev->agp_buffer_map, dev ); - } else + if (dev_priv->flags & CHIP_IS_AGP) { + if ( dev_priv->cp_ring != NULL ) + drm_core_ioremapfree( dev_priv->cp_ring, dev ); + if ( dev_priv->ring_rptr != NULL ) + drm_core_ioremapfree( dev_priv->ring_rptr, dev ); + if ( dev->agp_buffer_map != NULL ) + drm_core_ioremapfree( dev->agp_buffer_map, dev ); + } else #endif - { - if (!DRM(ati_pcigart_cleanup)( dev, - dev_priv->phys_pci_gart, - dev_priv->bus_pci_gart )) - DRM_ERROR( "failed to cleanup PCI GART!\n" ); - } - - DRM(free)( dev->dev_private, sizeof(drm_radeon_private_t), - DRM_MEM_DRIVER ); - dev->dev_private = NULL; + { + if (!DRM(ati_pcigart_cleanup)( dev, + dev_priv->phys_pci_gart, + dev_priv->bus_pci_gart )) + DRM_ERROR( "failed to cleanup PCI GART!\n" ); + } + + { + int flags = dev_priv->flags; + memset(dev_priv, 0, sizeof(*dev_priv)); + dev_priv->flags = flags; } return 0; @@ -1330,7 +1310,7 @@ static int radeon_do_resume_cp( drm_device_t *dev ) DRM_DEBUG("Starting radeon_do_resume_cp()\n"); #if __REALLY_HAVE_AGP - if ( !dev_priv->is_pci ) { + if (dev_priv->flags & CHIP_IS_AGP) { /* Turn off PCI GART */ radeon_set_pcigart( dev_priv, 0 ); } else @@ -1444,8 +1424,10 @@ void radeon_do_release( drm_device_t *dev ) { drm_radeon_private_t *dev_priv = dev->dev_private; int ret; + DRM_DEBUG("dev_priv %ptr\n", dev_priv); if (dev_priv) { + if (dev_priv->cp_running) { /* Stop the cp */ while ((ret = radeon_do_cp_idle( dev_priv )) != 0) { @@ -1461,7 +1443,8 @@ void radeon_do_release( drm_device_t *dev ) } /* Disable *all* interrupts */ - RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 ); + if (dev_priv->mmio) /* remove this after permanent addmaps */ + RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 ); /* Free memory heap structures */ radeon_mem_takedown( &(dev_priv->gart_heap) ); @@ -1745,3 +1728,81 @@ int radeon_cp_buffers( DRM_IOCTL_ARGS ) return ret; } + +static int radeon_register_regions(struct pci_dev *pdev) { + int retcode = -EINVAL; + + /* request the mem regions */ + if (!request_mem_region (pci_resource_start( pdev, 2 ), + pci_resource_len(pdev, 2), DRIVER_NAME)) { + printk(KERN_ERR DRIVER_NAME ": cannot reserve MMIO region\n"); + return retcode; + } + if (!request_mem_region (pci_resource_start( pdev, 0 ), + pci_resource_len(pdev, 0), DRIVER_NAME)) { + printk(KERN_ERR DRIVER_NAME ": cannot reserve FB region\n"); + return retcode; + } + return 0; +} + +static void radeon_release_regions(struct pci_dev *pdev) { + release_mem_region (pci_resource_start( pdev, 2 ), pci_resource_len(pdev, 2)); + release_mem_region (pci_resource_start( pdev, 0 ), pci_resource_len(pdev, 0)); +} + +/* Always create a map record for MMIO and FB memory, done from DRIVER_POSTINIT */ +int radeon_preinit( struct drm_device *dev, unsigned long flags ) +{ + int retcode = -EINVAL; + u32 save, temp; + drm_radeon_private_t *dev_priv; + + dev_priv = DRM(alloc)( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER ); + if ( dev_priv == NULL ) + return DRM_ERR(ENOMEM); + DRM_DEBUG("dev_priv %ptr\n", dev_priv); + + memset( dev_priv, 0, sizeof(drm_radeon_private_t) ); + dev->dev_private = (void *)dev_priv; + dev_priv->flags = flags; + + /* request the mem regions */ + if (!DRM(fb_loaded)) + if ((retcode = radeon_register_regions(dev->pdev)) != 0) + return retcode; + + /* There are signatures in BIOS and PCI-SSID for a PCI card, but they are not very reliable. + Following detection method works for all cards tested so far. + Note, checking AGP_ENABLE bit after drmAgpEnable call can also give the correct result. + However, calling drmAgpEnable on a PCI card can cause some strange lockup when the server + restarts next time. + */ + pci_read_config_dword(dev->pdev, RADEON_AGP_COMMAND_PCI_CONFIG, &save); + pci_write_config_dword(dev->pdev, RADEON_AGP_COMMAND_PCI_CONFIG, save | RADEON_AGP_ENABLE); + pci_read_config_dword(dev->pdev, RADEON_AGP_COMMAND_PCI_CONFIG, &temp); + if (temp & RADEON_AGP_ENABLE) + dev_priv->flags |= CHIP_IS_AGP; + DRM_DEBUG("%s card detected\n", ((dev_priv->flags & CHIP_IS_AGP) ? "AGP" : "PCI")); + pci_write_config_dword(dev->pdev, RADEON_AGP_COMMAND_PCI_CONFIG, save); + + return 0; +} + +int radeon_postinit( struct drm_device *dev, unsigned long flags ) +{ + return 0; +} + +int radeon_postcleanup( struct drm_device *dev ) +{ + drm_radeon_private_t *dev_priv = dev->dev_private; + + DRM(free)( dev_priv, sizeof(*dev_priv), DRM_MEM_DRIVER ); + + if (!DRM(fb_loaded)) + radeon_release_regions(dev->pdev); + + dev->dev_private = NULL; + return 0; +} diff --git a/shared-core/radeon_drm.h b/shared-core/radeon_drm.h index e447308b..207a0c00 100644 --- a/shared-core/radeon_drm.h +++ b/shared-core/radeon_drm.h @@ -433,7 +433,7 @@ typedef struct drm_radeon_init { RADEON_INIT_R200_CP = 0x03 } func; unsigned long sarea_priv_offset; - int is_pci; + int is_pci; /* not used, driver asks hardware */ int cp_mode; int gart_size; int ring_size; diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h index f0aa0dc2..4b66e5be 100644 --- a/shared-core/radeon_drv.h +++ b/shared-core/radeon_drv.h @@ -31,6 +31,18 @@ #ifndef __RADEON_DRV_H__ #define __RADEON_DRV_H__ +/* + * Chip flags + */ +enum radeon_chip_flags { + CHIP_FAMILY_MASK = 0x0000ffffUL, + CHIP_FLAGS_MASK = 0xffff0000UL, + CHIP_IS_MOBILITY = 0x00010000UL, + CHIP_IS_IGP = 0x00020000UL, + CHIP_SINGLE_CRTC = 0x00040000UL, + CHIP_IS_AGP = 0x00080000UL, +}; + #define GET_RING_HEAD(dev_priv) DRM_READ32( (dev_priv)->ring_rptr, 0 ) #define SET_RING_HEAD(dev_priv,val) DRM_WRITE32( (dev_priv)->ring_rptr, 0, (val) ) @@ -70,6 +82,9 @@ struct mem_block { }; typedef struct drm_radeon_private { + + uint32_t flags; /* see radeon_chip_flags */ + drm_radeon_ring_buffer_t ring; drm_radeon_sarea_t *sarea_priv; @@ -92,7 +107,6 @@ typedef struct drm_radeon_private { int is_r200; - int is_pci; unsigned long phys_pci_gart; dma_addr_t bus_pci_gart; @@ -211,13 +225,13 @@ extern void radeon_do_release(drm_device_t *dev); #define RADEON_BOX_WAIT_IDLE 0x8 #define RADEON_BOX_TEXTURE_LOAD 0x10 - - /* Register definitions, register access macros and drmAddMap constants * for Radeon kernel driver. */ - #define RADEON_AGP_COMMAND 0x0f60 +#define RADEON_AGP_COMMAND_PCI_CONFIG 0x0060 /* offset in PCI config*/ +# define RADEON_AGP_ENABLE (1<<8) + #define RADEON_AUX_SCISSOR_CNTL 0x26f0 # define RADEON_EXCLUSIVE_SCISSOR_0 (1 << 24) # define RADEON_EXCLUSIVE_SCISSOR_1 (1 << 25) @@ -240,6 +254,11 @@ extern void radeon_do_release(drm_device_t *dev); #define RADEON_CRTC2_OFFSET 0x0324 #define RADEON_CRTC2_OFFSET_CNTL 0x0328 +#define RADEON_MPP_TB_CONFIG 0x01c0 +#define RADEON_MEM_CNTL 0x0140 +#define RADEON_MEM_SDRAM_MODE_REG 0x0158 +#define RADEON_AGP_BASE 0x0170 + #define RADEON_RB3D_COLOROFFSET 0x1c40 #define RADEON_RB3D_COLORPITCH 0x1c48 @@ -718,7 +737,9 @@ do { \ } while (0) extern int RADEON_READ_PLL( drm_device_t *dev, int addr ); - +extern int radeon_preinit( struct drm_device *dev, unsigned long flags ); +extern int radeon_postinit( struct drm_device *dev, unsigned long flags ); +extern int radeon_postcleanup( struct drm_device *dev ); #define CP_PACKET0( reg, n ) \ (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2)) diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c index 57274174..4a7bfd2d 100644 --- a/shared-core/radeon_state.c +++ b/shared-core/radeon_state.c @@ -2583,6 +2583,9 @@ static void radeon_driver_open_helper(drm_device_t *dev, drm_file_t *filp_priv) void radeon_driver_register_fns(struct drm_device *dev) { dev->dev_priv_size = sizeof(drm_radeon_buf_priv_t); + dev->fn_tbl.preinit = radeon_preinit; + dev->fn_tbl.postinit = radeon_postinit; + dev->fn_tbl.postcleanup = radeon_postcleanup; dev->fn_tbl.prerelease = radeon_driver_prerelease; dev->fn_tbl.pretakedown = radeon_driver_pretakedown; dev->fn_tbl.open_helper = radeon_driver_open_helper; diff --git a/shared-core/sis_drv.h b/shared-core/sis_drv.h index a8700181..1ca618cf 100644 --- a/shared-core/sis_drv.h +++ b/shared-core/sis_drv.h @@ -42,4 +42,7 @@ extern int sis_ioctl_agp_alloc( DRM_IOCTL_ARGS ); extern int sis_ioctl_agp_free( DRM_IOCTL_ARGS ); extern int sis_fb_init( DRM_IOCTL_ARGS ); +extern int sis_init_context(drm_device_t *dev, int context); +extern int sis_final_context(drm_device_t *dev, int context); + #endif diff --git a/shared-core/via_drv.h b/shared-core/via_drv.h index ee3852c3..9677b7f3 100644 --- a/shared-core/via_drv.h +++ b/shared-core/via_drv.h @@ -45,7 +45,9 @@ typedef struct drm_via_private { #define VIA_READ8(reg) DRM_READ8(VIA_BASE, reg) #define VIA_WRITE8(reg,val) DRM_WRITE8(VIA_BASE, reg, val) - +extern int via_init_context(drm_device_t *dev, int context); +extern int via_final_context(drm_device_t *dev, int context); + extern int via_do_init_map(drm_device_t *dev, drm_via_init_t *init); extern int via_do_cleanup_map(drm_device_t *dev); extern int via_map_init(struct inode *inode, struct file *filp, |