Peter Huewe | 84359ef | 2012-02-09 21:11:43 +0100 | [diff] [blame] | 1 | #ifndef _VB_DEF_ |
| 2 | #define _VB_DEF_ |
Tomi Valkeinen | f7018c2 | 2014-02-13 15:31:38 +0200 | [diff] [blame] | 3 | #include "../../video/fbdev/sis/initdef.h" |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 4 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 5 | #define VB_XGI301C 0x0020 /* for 301C */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 6 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 7 | #define SupportCRT2in301C 0x0100 /* for 301C */ |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 8 | #define SetCHTVOverScan 0x8000 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 9 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 10 | #define PanelResInfo 0x1F /* CR36 Panel Type/LCDResInfo */ |
Peter Huewe | 255aabd | 2012-02-09 21:11:44 +0100 | [diff] [blame] | 11 | #define Panel_1024x768x75 0x22 |
| 12 | #define Panel_1280x1024x75 0x23 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 13 | |
| 14 | #define PanelRef60Hz 0x00 |
| 15 | #define PanelRef75Hz 0x20 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 16 | |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 17 | #define YPbPr525iVCLK 0x03B |
| 18 | #define YPbPr525iVCLK_2 0x03A |
| 19 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 20 | #define XGI_CRT2_PORT_00 (0x00 - 0x030) |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 21 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 22 | #define SupportAllCRT2 0x0078 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 23 | #define NoSupportTV 0x0070 |
| 24 | #define NoSupportHiVisionTV 0x0060 |
| 25 | #define NoSupportLCD 0x0058 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 26 | |
| 27 | /* -------------- SetMode Stack/Scratch */ |
Peter Huewe | a3d675c | 2012-02-09 21:11:47 +0100 | [diff] [blame] | 28 | #define XGI_SetCRT2ToLCDA 0x0100 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 29 | #define SetCRT2ToDualEdge 0x8000 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 30 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 31 | #define ReserveTVOption 0x0008 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 32 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 33 | #define SetTVLowResolution 0x0400 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 34 | #define TVSimuMode 0x0800 |
| 35 | #define RPLLDIV2XO 0x1000 |
| 36 | #define NTSC1024x768 0x2000 |
| 37 | #define SetTVLockMode 0x4000 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 38 | |
Peter Huewe | a3d675c | 2012-02-09 21:11:47 +0100 | [diff] [blame] | 39 | #define XGI_LCDVESATiming 0x0001 /* LCD Info/CR37 */ |
| 40 | #define XGI_EnableLVDSDDA 0x0002 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 41 | #define EnableScalingLCD 0x0008 |
| 42 | #define SetPWDEnable 0x0004 |
| 43 | #define SetLCDtoNonExpanding 0x0010 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 44 | #define SetLCDDualLink 0x0100 |
| 45 | #define SetLCDLowResolution 0x0200 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 46 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 47 | /* LCD Capability shampoo */ |
| 48 | #define DefaultLCDCap 0x80ea |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 49 | #define EnableLCD24bpp 0x0004 /* default */ |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 50 | #define LCDPolarity 0x00c0 /* default: SyncNN */ |
Peter Huewe | a3d675c | 2012-02-09 21:11:47 +0100 | [diff] [blame] | 51 | #define XGI_LCDDualLink 0x0100 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 52 | #define EnableSpectrum 0x0200 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 53 | #define PWDEnable 0x0400 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 54 | #define EnableVBCLKDRVLOW 0x4000 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 55 | #define EnablePLLSPLOW 0x8000 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 56 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 57 | #define AVIDEOSense 0x01 /* CR32 */ |
| 58 | #define SVIDEOSense 0x02 |
| 59 | #define SCARTSense 0x04 |
| 60 | #define LCDSense 0x08 |
| 61 | #define Monitor2Sense 0x10 |
| 62 | #define Monitor1Sense 0x20 |
| 63 | #define HiTVSense 0x40 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 64 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 65 | #define YPbPrSense 0x80 /* NEW SCRATCH */ |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 66 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 67 | #define TVSense 0xc7 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 68 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 69 | #define YPbPrMode 0xe0 |
| 70 | #define YPbPrMode525i 0x00 |
| 71 | #define YPbPrMode525p 0x20 |
| 72 | #define YPbPrMode750p 0x40 |
| 73 | #define YPbPrMode1080i 0x60 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 74 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 75 | #define ScalingLCD 0x08 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 76 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 77 | #define SetYPbPr 0x04 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 78 | |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 79 | /* ---------------------- VUMA Information */ |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 80 | #define DisplayDeviceFromCMOS 0x10 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 81 | |
| 82 | /* ---------------------- HK Evnet Definition */ |
Peter Huewe | a3d675c | 2012-02-09 21:11:47 +0100 | [diff] [blame] | 83 | #define XGI_ModeSwitchStatus 0xf0 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 84 | #define ActiveCRT1 0x10 |
| 85 | #define ActiveLCD 0x0020 |
| 86 | #define ActiveTV 0x40 |
| 87 | #define ActiveCRT2 0x80 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 88 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 89 | #define ActiveAVideo 0x01 |
| 90 | #define ActiveSVideo 0x02 |
| 91 | #define ActiveSCART 0x04 |
| 92 | #define ActiveHiTV 0x08 |
| 93 | #define ActiveYPbPr 0x10 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 94 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 95 | #define NTSC1024x768HT 1908 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 96 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 97 | #define YPbPrTV525iHT 1716 /* YPbPr */ |
| 98 | #define YPbPrTV525iVT 525 |
| 99 | #define YPbPrTV525pHT 1716 |
| 100 | #define YPbPrTV525pVT 525 |
| 101 | #define YPbPrTV750pHT 1650 |
| 102 | #define YPbPrTV750pVT 750 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 103 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 104 | #define VCLK25_175 0x00 |
| 105 | #define VCLK28_322 0x01 |
| 106 | #define VCLK31_5 0x02 |
| 107 | #define VCLK36 0x03 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 108 | #define VCLK43_163 0x05 |
| 109 | #define VCLK44_9 0x06 |
| 110 | #define VCLK49_5 0x07 |
| 111 | #define VCLK50 0x08 |
| 112 | #define VCLK52_406 0x09 |
| 113 | #define VCLK56_25 0x0A |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 114 | #define VCLK68_179 0x0D |
| 115 | #define VCLK72_852 0x0E |
| 116 | #define VCLK75 0x0F |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 117 | #define VCLK78_75 0x11 |
| 118 | #define VCLK79_411 0x12 |
| 119 | #define VCLK83_95 0x13 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 120 | #define VCLK86_6 0x15 |
| 121 | #define VCLK94_5 0x16 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 122 | #define VCLK113_309 0x1B |
| 123 | #define VCLK116_406 0x1C |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 124 | #define VCLK135_5 0x1E |
| 125 | #define VCLK139_054 0x1F |
| 126 | #define VCLK157_5 0x20 |
| 127 | #define VCLK162 0x21 |
| 128 | #define VCLK175 0x22 |
| 129 | #define VCLK189 0x23 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 130 | #define VCLK202_5 0x25 |
| 131 | #define VCLK229_5 0x26 |
| 132 | #define VCLK234 0x27 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 133 | #define VCLK254_817 0x29 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 134 | #define VCLK266_952 0x2B |
| 135 | #define VCLK269_655 0x2C |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 136 | #define VCLK277_015 0x2E |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 137 | #define VCLK291_132 0x30 |
| 138 | #define VCLK291_766 0x31 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 139 | #define VCLK315_195 0x33 |
| 140 | #define VCLK323_586 0x34 |
| 141 | #define VCLK330_615 0x35 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 142 | #define VCLK340_477 0x37 |
| 143 | #define VCLK375_847 0x38 |
| 144 | #define VCLK388_631 0x39 |
| 145 | #define VCLK125_999 0x51 |
| 146 | #define VCLK148_5 0x52 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 147 | #define VCLK217_325 0x55 |
Peter Huewe | a3d675c | 2012-02-09 21:11:47 +0100 | [diff] [blame] | 148 | #define XGI_YPbPr750pVCLK 0x57 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 149 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 150 | #define VCLK39_77 0x40 |
Peter Huewe | c3b3b3f | 2012-02-09 21:11:49 +0100 | [diff] [blame] | 151 | #define YPbPr525pVCLK 0x3A |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 152 | #define NTSC1024VCLK 0x41 |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 153 | #define VCLK35_2 0x49 /* ; 800x480 */ |
| 154 | #define VCLK122_61 0x4A |
| 155 | #define VCLK80_350 0x4B |
| 156 | #define VCLK107_385 0x4C |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 157 | |
Kenji Toyama | 661f659 | 2011-04-23 07:02:49 +0800 | [diff] [blame] | 158 | #define RES320x200 0x00 |
| 159 | #define RES320x240 0x01 |
| 160 | #define RES400x300 0x02 |
| 161 | #define RES512x384 0x03 |
| 162 | #define RES640x400 0x04 |
| 163 | #define RES640x480x60 0x05 |
| 164 | #define RES640x480x72 0x06 |
| 165 | #define RES640x480x75 0x07 |
| 166 | #define RES640x480x85 0x08 |
| 167 | #define RES640x480x100 0x09 |
| 168 | #define RES640x480x120 0x0A |
| 169 | #define RES640x480x160 0x0B |
| 170 | #define RES640x480x200 0x0C |
| 171 | #define RES800x600x56 0x0D |
| 172 | #define RES800x600x60 0x0E |
| 173 | #define RES800x600x72 0x0F |
| 174 | #define RES800x600x75 0x10 |
| 175 | #define RES800x600x85 0x11 |
| 176 | #define RES800x600x100 0x12 |
| 177 | #define RES800x600x120 0x13 |
| 178 | #define RES800x600x160 0x14 |
| 179 | #define RES1024x768x43 0x15 |
| 180 | #define RES1024x768x60 0x16 |
| 181 | #define RES1024x768x70 0x17 |
| 182 | #define RES1024x768x75 0x18 |
| 183 | #define RES1024x768x85 0x19 |
| 184 | #define RES1024x768x100 0x1A |
| 185 | #define RES1024x768x120 0x1B |
| 186 | #define RES1280x1024x43 0x1C |
| 187 | #define RES1280x1024x60 0x1D |
| 188 | #define RES1280x1024x75 0x1E |
| 189 | #define RES1280x1024x85 0x1F |
| 190 | #define RES1600x1200x60 0x20 |
| 191 | #define RES1600x1200x65 0x21 |
| 192 | #define RES1600x1200x70 0x22 |
| 193 | #define RES1600x1200x75 0x23 |
| 194 | #define RES1600x1200x85 0x24 |
| 195 | #define RES1600x1200x100 0x25 |
| 196 | #define RES1600x1200x120 0x26 |
| 197 | #define RES1920x1440x60 0x27 |
| 198 | #define RES1920x1440x65 0x28 |
| 199 | #define RES1920x1440x70 0x29 |
| 200 | #define RES1920x1440x75 0x2A |
| 201 | #define RES1920x1440x85 0x2B |
| 202 | #define RES1920x1440x100 0x2C |
| 203 | #define RES2048x1536x60 0x2D |
| 204 | #define RES2048x1536x65 0x2E |
| 205 | #define RES2048x1536x70 0x2F |
| 206 | #define RES2048x1536x75 0x30 |
| 207 | #define RES2048x1536x85 0x31 |
| 208 | #define RES800x480x60 0x32 |
| 209 | #define RES800x480x75 0x33 |
| 210 | #define RES800x480x85 0x34 |
| 211 | #define RES1024x576x60 0x35 |
| 212 | #define RES1024x576x75 0x36 |
| 213 | #define RES1024x576x85 0x37 |
| 214 | #define RES1280x720x60 0x38 |
| 215 | #define RES1280x720x75 0x39 |
| 216 | #define RES1280x720x85 0x3A |
| 217 | #define RES1280x960x60 0x3B |
| 218 | #define RES720x480x60 0x3C |
| 219 | #define RES720x576x56 0x3D |
| 220 | #define RES856x480x79I 0x3E |
| 221 | #define RES856x480x60 0x3F |
| 222 | #define RES1280x768x60 0x40 |
| 223 | #define RES1400x1050x60 0x41 |
| 224 | #define RES1152x864x60 0x42 |
| 225 | #define RES1152x864x75 0x43 |
| 226 | #define RES1024x768x160 0x44 |
| 227 | #define RES1280x960x75 0x45 |
| 228 | #define RES1280x960x85 0x46 |
| 229 | #define RES1280x960x120 0x47 |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 230 | |
Peter Huewe | 6d12dae | 2012-06-14 00:21:52 +0200 | [diff] [blame] | 231 | #define XG27_CR8F 0x0C |
| 232 | #define XG27_SR36 0x30 |
| 233 | #define XG27_SR40 0x04 |
| 234 | #define XG27_SR41 0x00 |
| 235 | #define XG40_CRCF 0x13 |
| 236 | #define XGI330_CRT2Data_1_2 0 |
| 237 | #define XGI330_CRT2Data_4_D 0 |
| 238 | #define XGI330_CRT2Data_4_E 0 |
| 239 | #define XGI330_CRT2Data_4_10 0x80 |
| 240 | #define XGI330_SR07 0x18 |
| 241 | #define XGI330_SR1F 0 |
| 242 | #define XGI330_SR23 0xf6 |
| 243 | #define XGI330_SR24 0x0d |
Peter Huewe | 6d12dae | 2012-06-14 00:21:52 +0200 | [diff] [blame] | 244 | #define XGI330_SR31 0xc0 |
| 245 | #define XGI330_SR32 0x11 |
| 246 | #define XGI330_SR33 0 |
| 247 | |
Aaro Koskinen | b397992 | 2012-11-04 21:14:52 +0200 | [diff] [blame] | 248 | extern const struct XGI_ExtStruct XGI330_EModeIDTable[]; |
Aaro Koskinen | a39325d | 2012-11-04 21:14:53 +0200 | [diff] [blame] | 249 | extern const struct XGI_Ext2Struct XGI330_RefIndex[]; |
Aaro Koskinen | 7853bce | 2012-11-04 21:14:54 +0200 | [diff] [blame] | 250 | extern const struct XGI_CRT1TableStruct XGI_CRT1Table[]; |
Aaro Koskinen | 9b04745 | 2012-11-04 21:14:57 +0200 | [diff] [blame] | 251 | extern const struct XGI_ECLKDataStruct XGI340_ECLKData[]; |
Aaro Koskinen | acfe093 | 2012-11-04 21:14:58 +0200 | [diff] [blame] | 252 | extern const struct SiS_VCLKData XGI_VCLKData[]; |
Aaro Koskinen | 5ce2476 | 2012-11-04 21:15:03 +0200 | [diff] [blame] | 253 | extern const unsigned char XGI340_CR6B[][4]; |
Aaro Koskinen | ea12b4e | 2012-11-04 21:15:05 +0200 | [diff] [blame] | 254 | extern const unsigned char XGI340_AGPReg[]; |
Aaro Koskinen | b397992 | 2012-11-04 21:14:52 +0200 | [diff] [blame] | 255 | |
apatard@mandriva.com | d7636e0 | 2010-05-19 10:44:14 +0200 | [diff] [blame] | 256 | #endif |