| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#ifndef AST_TABLES_H |
| 5 |
#define AST_TABLES_H |
| 6 |
|
| 7 |
|
| 8 |
#define TextModeIndex 0 |
| 9 |
#define EGAModeIndex 1 |
| 10 |
#define VGAModeIndex 2 |
| 11 |
#define HiCModeIndex 3 |
| 12 |
#define TrueCModeIndex 4 |
| 13 |
|
| 14 |
#define Charx8Dot 0x00000001 |
| 15 |
#define HalfDCLK 0x00000002 |
| 16 |
#define DoubleScanMode 0x00000004 |
| 17 |
#define LineCompareOff 0x00000008 |
| 18 |
#define HBorder 0x00000020 |
| 19 |
#define VBorder 0x00000010 |
| 20 |
#define WideScreenMode 0x00000100 |
| 21 |
#define NewModeInfo 0x00000200 |
| 22 |
#define NHSync 0x00000400 |
| 23 |
#define PHSync 0x00000800 |
| 24 |
#define NVSync 0x00001000 |
| 25 |
#define PVSync 0x00002000 |
| 26 |
#define SyncPP (PVSync | PHSync) |
| 27 |
#define SyncPN (PVSync | NHSync) |
| 28 |
#define SyncNP (NVSync | PHSync) |
| 29 |
#define SyncNN (NVSync | NHSync) |
| 30 |
#define AST2500PreCatchCRT 0x00004000 |
| 31 |
|
| 32 |
|
| 33 |
#define VCLK25_175 0x00 |
| 34 |
#define VCLK28_322 0x01 |
| 35 |
#define VCLK31_5 0x02 |
| 36 |
#define VCLK36 0x03 |
| 37 |
#define VCLK40 0x04 |
| 38 |
#define VCLK49_5 0x05 |
| 39 |
#define VCLK50 0x06 |
| 40 |
#define VCLK56_25 0x07 |
| 41 |
#define VCLK65 0x08 |
| 42 |
#define VCLK75 0x09 |
| 43 |
#define VCLK78_75 0x0A |
| 44 |
#define VCLK94_5 0x0B |
| 45 |
#define VCLK108 0x0C |
| 46 |
#define VCLK135 0x0D |
| 47 |
#define VCLK157_5 0x0E |
| 48 |
#define VCLK162 0x0F |
| 49 |
|
| 50 |
#define VCLK154 0x10 |
| 51 |
#define VCLK83_5 0x11 |
| 52 |
#define VCLK106_5 0x12 |
| 53 |
#define VCLK146_25 0x13 |
| 54 |
#define VCLK148_5 0x14 |
| 55 |
#define VCLK71 0x15 |
| 56 |
#define VCLK88_75 0x16 |
| 57 |
#define VCLK119 0x17 |
| 58 |
#define VCLK85_5 0x18 |
| 59 |
#define VCLK97_75 0x19 |
| 60 |
#define VCLK118_25 0x1A |
| 61 |
|
| 62 |
static struct ast_vbios_dclk_info dclk_table[] = { |
| 63 |
{0x2C, 0xE7, 0x03}, |
| 64 |
{0x95, 0x62, 0x03}, |
| 65 |
{0x67, 0x63, 0x01}, |
| 66 |
{0x76, 0x63, 0x01}, |
| 67 |
{0xEE, 0x67, 0x01}, |
| 68 |
{0x82, 0x62, 0x01}, |
| 69 |
{0xC6, 0x64, 0x01}, |
| 70 |
{0x94, 0x62, 0x01}, |
| 71 |
{0x80, 0x64, 0x00}, |
| 72 |
{0x7B, 0x63, 0x00}, |
| 73 |
{0x67, 0x62, 0x00}, |
| 74 |
{0x7C, 0x62, 0x00}, |
| 75 |
{0x8E, 0x62, 0x00}, |
| 76 |
{0x85, 0x24, 0x00}, |
| 77 |
{0x67, 0x22, 0x00}, |
| 78 |
{0x6A, 0x22, 0x00}, |
| 79 |
{0x4d, 0x4c, 0x80}, |
| 80 |
{0xa7, 0x78, 0x80}, |
| 81 |
{0x28, 0x49, 0x80}, |
| 82 |
{0x37, 0x49, 0x80}, |
| 83 |
{0x1f, 0x45, 0x80}, |
| 84 |
{0x47, 0x6c, 0x80}, |
| 85 |
{0x25, 0x65, 0x80}, |
| 86 |
{0x77, 0x58, 0x80}, |
| 87 |
{0x32, 0x67, 0x80}, |
| 88 |
{0x6a, 0x6d, 0x80}, |
| 89 |
{0x3b, 0x2c, 0x81}, |
| 90 |
}; |
| 91 |
|
| 92 |
static const struct ast_vbios_dclk_info dclk_table_ast2500[] = { |
| 93 |
{0x2C, 0xE7, 0x03}, |
| 94 |
{0x95, 0x62, 0x03}, |
| 95 |
{0x67, 0x63, 0x01}, |
| 96 |
{0x76, 0x63, 0x01}, |
| 97 |
{0xEE, 0x67, 0x01}, |
| 98 |
{0x82, 0x62, 0x01}, |
| 99 |
{0xC6, 0x64, 0x01}, |
| 100 |
{0x94, 0x62, 0x01}, |
| 101 |
{0x80, 0x64, 0x00}, |
| 102 |
{0x7B, 0x63, 0x00}, |
| 103 |
{0x67, 0x62, 0x00}, |
| 104 |
{0x7C, 0x62, 0x00}, |
| 105 |
{0x8E, 0x62, 0x00}, |
| 106 |
{0x85, 0x24, 0x00}, |
| 107 |
{0x67, 0x22, 0x00}, |
| 108 |
{0x6A, 0x22, 0x00}, |
| 109 |
{0x4d, 0x4c, 0x80}, |
| 110 |
{0x68, 0x6f, 0x80}, |
| 111 |
{0x28, 0x49, 0x80}, |
| 112 |
{0x37, 0x49, 0x80}, |
| 113 |
{0x1f, 0x45, 0x80}, |
| 114 |
{0x47, 0x6c, 0x80}, |
| 115 |
{0x25, 0x65, 0x80}, |
| 116 |
{0x58, 0x01, 0x42}, |
| 117 |
{0x32, 0x67, 0x80}, |
| 118 |
{0x6a, 0x6d, 0x80}, |
| 119 |
{0x44, 0x20, 0x43}, |
| 120 |
}; |
| 121 |
|
| 122 |
static struct ast_vbios_stdtable vbios_stdtable[] = { |
| 123 |
|
| 124 |
{ |
| 125 |
0x67, |
| 126 |
{0x00, 0x03, 0x00, 0x02}, |
| 127 |
{0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, |
| 128 |
0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, |
| 129 |
0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3, |
| 130 |
0xff}, |
| 131 |
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, |
| 132 |
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, |
| 133 |
0x0c, 0x00, 0x0f, 0x08}, |
| 134 |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, |
| 135 |
0xff} |
| 136 |
}, |
| 137 |
|
| 138 |
{ |
| 139 |
0xe3, |
| 140 |
{0x01, 0x0f, 0x00, 0x06}, |
| 141 |
{0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0x0b, 0x3e, |
| 142 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 143 |
0xe9, 0x8b, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3, |
| 144 |
0xff}, |
| 145 |
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, |
| 146 |
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, |
| 147 |
0x01, 0x00, 0x0f, 0x00}, |
| 148 |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, |
| 149 |
0xff} |
| 150 |
}, |
| 151 |
|
| 152 |
{ |
| 153 |
0x2f, |
| 154 |
{0x01, 0x0f, 0x00, 0x0e}, |
| 155 |
{0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, |
| 156 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 157 |
0xea, 0x8c, 0xdf, 0x28, 0x40, 0xe7, 0x04, 0xa3, |
| 158 |
0xff}, |
| 159 |
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 160 |
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 161 |
0x01, 0x00, 0x00, 0x00}, |
| 162 |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0f, |
| 163 |
0xff} |
| 164 |
}, |
| 165 |
|
| 166 |
{ |
| 167 |
0x2f, |
| 168 |
{0x01, 0x0f, 0x00, 0x0e}, |
| 169 |
{0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, |
| 170 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 171 |
0xea, 0x8c, 0xdf, 0x28, 0x40, 0xe7, 0x04, 0xa3, |
| 172 |
0xff}, |
| 173 |
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 174 |
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 175 |
0x01, 0x00, 0x00, 0x00}, |
| 176 |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, |
| 177 |
0xff} |
| 178 |
}, |
| 179 |
|
| 180 |
{ |
| 181 |
0x2f, |
| 182 |
{0x01, 0x0f, 0x00, 0x0e}, |
| 183 |
{0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, |
| 184 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 185 |
0xea, 0x8c, 0xdf, 0x28, 0x40, 0xe7, 0x04, 0xa3, |
| 186 |
0xff}, |
| 187 |
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 188 |
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 189 |
0x01, 0x00, 0x00, 0x00}, |
| 190 |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, |
| 191 |
0xff} |
| 192 |
}, |
| 193 |
}; |
| 194 |
|
| 195 |
static const struct ast_vbios_enhtable res_640x480[] = { |
| 196 |
{ 800, 640, 8, 96, 525, 480, 2, 2, VCLK25_175, |
| 197 |
(SyncNN | HBorder | VBorder | Charx8Dot), 60, 1, 0x2E }, |
| 198 |
{ 832, 640, 16, 40, 520, 480, 1, 3, VCLK31_5, |
| 199 |
(SyncNN | HBorder | VBorder | Charx8Dot), 72, 2, 0x2E }, |
| 200 |
{ 840, 640, 16, 64, 500, 480, 1, 3, VCLK31_5, |
| 201 |
(SyncNN | Charx8Dot) , 75, 3, 0x2E }, |
| 202 |
{ 832, 640, 56, 56, 509, 480, 1, 3, VCLK36, |
| 203 |
(SyncNN | Charx8Dot) , 85, 4, 0x2E }, |
| 204 |
{ 832, 640, 56, 56, 509, 480, 1, 3, VCLK36, |
| 205 |
(SyncNN | Charx8Dot) , 0xFF, 4, 0x2E }, |
| 206 |
}; |
| 207 |
|
| 208 |
static const struct ast_vbios_enhtable res_800x600[] = { |
| 209 |
{1024, 800, 24, 72, 625, 600, 1, 2, VCLK36, |
| 210 |
(SyncPP | Charx8Dot), 56, 1, 0x30 }, |
| 211 |
{1056, 800, 40, 128, 628, 600, 1, 4, VCLK40, |
| 212 |
(SyncPP | Charx8Dot), 60, 2, 0x30 }, |
| 213 |
{1040, 800, 56, 120, 666, 600, 37, 6, VCLK50, |
| 214 |
(SyncPP | Charx8Dot), 72, 3, 0x30 }, |
| 215 |
{1056, 800, 16, 80, 625, 600, 1, 3, VCLK49_5, |
| 216 |
(SyncPP | Charx8Dot), 75, 4, 0x30 }, |
| 217 |
{1048, 800, 32, 64, 631, 600, 1, 3, VCLK56_25, |
| 218 |
(SyncPP | Charx8Dot), 84, 5, 0x30 }, |
| 219 |
{1048, 800, 32, 64, 631, 600, 1, 3, VCLK56_25, |
| 220 |
(SyncPP | Charx8Dot), 0xFF, 5, 0x30 }, |
| 221 |
}; |
| 222 |
|
| 223 |
static const struct ast_vbios_enhtable res_1024x768[] = { |
| 224 |
{1344, 1024, 24, 136, 806, 768, 3, 6, VCLK65, |
| 225 |
(SyncNN | Charx8Dot), 60, 1, 0x31 }, |
| 226 |
{1328, 1024, 24, 136, 806, 768, 3, 6, VCLK75, |
| 227 |
(SyncNN | Charx8Dot), 70, 2, 0x31 }, |
| 228 |
{1312, 1024, 16, 96, 800, 768, 1, 3, VCLK78_75, |
| 229 |
(SyncPP | Charx8Dot), 75, 3, 0x31 }, |
| 230 |
{1376, 1024, 48, 96, 808, 768, 1, 3, VCLK94_5, |
| 231 |
(SyncPP | Charx8Dot), 84, 4, 0x31 }, |
| 232 |
{1376, 1024, 48, 96, 808, 768, 1, 3, VCLK94_5, |
| 233 |
(SyncPP | Charx8Dot), 0xFF, 4, 0x31 }, |
| 234 |
}; |
| 235 |
|
| 236 |
static const struct ast_vbios_enhtable res_1280x1024[] = { |
| 237 |
{1688, 1280, 48, 112, 1066, 1024, 1, 3, VCLK108, |
| 238 |
(SyncPP | Charx8Dot), 60, 1, 0x32 }, |
| 239 |
{1688, 1280, 16, 144, 1066, 1024, 1, 3, VCLK135, |
| 240 |
(SyncPP | Charx8Dot), 75, 2, 0x32 }, |
| 241 |
{1728, 1280, 64, 160, 1072, 1024, 1, 3, VCLK157_5, |
| 242 |
(SyncPP | Charx8Dot), 85, 3, 0x32 }, |
| 243 |
{1728, 1280, 64, 160, 1072, 1024, 1, 3, VCLK157_5, |
| 244 |
(SyncPP | Charx8Dot), 0xFF, 3, 0x32 }, |
| 245 |
}; |
| 246 |
|
| 247 |
static const struct ast_vbios_enhtable res_1600x1200[] = { |
| 248 |
{2160, 1600, 64, 192, 1250, 1200, 1, 3, VCLK162, |
| 249 |
(SyncPP | Charx8Dot), 60, 1, 0x33 }, |
| 250 |
{2160, 1600, 64, 192, 1250, 1200, 1, 3, VCLK162, |
| 251 |
(SyncPP | Charx8Dot), 0xFF, 1, 0x33 }, |
| 252 |
}; |
| 253 |
|
| 254 |
|
| 255 |
static const struct ast_vbios_enhtable res_1360x768[] = { |
| 256 |
{1792, 1360, 64, 112, 795, 768, 3, 6, VCLK85_5, |
| 257 |
(SyncPP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 60, 1, 0x39 }, |
| 258 |
{1792, 1360, 64, 112, 795, 768, 3, 6, VCLK85_5, |
| 259 |
(SyncPP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 260 |
AST2500PreCatchCRT), 0xFF, 1, 0x39 }, |
| 261 |
}; |
| 262 |
|
| 263 |
static const struct ast_vbios_enhtable res_1600x900[] = { |
| 264 |
{1760, 1600, 48, 32, 926, 900, 3, 5, VCLK97_75, |
| 265 |
(SyncNP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 266 |
AST2500PreCatchCRT), 60, 1, 0x3A }, |
| 267 |
{2112, 1600, 88, 168, 934, 900, 3, 5, VCLK118_25, |
| 268 |
(SyncPN | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 60, 2, 0x3A }, |
| 269 |
{2112, 1600, 88, 168, 934, 900, 3, 5, VCLK118_25, |
| 270 |
(SyncPN | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 0xFF, 2, 0x3A }, |
| 271 |
}; |
| 272 |
|
| 273 |
static const struct ast_vbios_enhtable res_1920x1080[] = { |
| 274 |
{2200, 1920, 88, 44, 1125, 1080, 4, 5, VCLK148_5, |
| 275 |
(SyncNP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 276 |
AST2500PreCatchCRT), 60, 1, 0x38 }, |
| 277 |
{2200, 1920, 88, 44, 1125, 1080, 4, 5, VCLK148_5, |
| 278 |
(SyncNP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 279 |
AST2500PreCatchCRT), 0xFF, 1, 0x38 }, |
| 280 |
}; |
| 281 |
|
| 282 |
|
| 283 |
static const struct ast_vbios_enhtable res_1280x800[] = { |
| 284 |
{1440, 1280, 48, 32, 823, 800, 3, 6, VCLK71, |
| 285 |
(SyncNP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 286 |
AST2500PreCatchCRT), 60, 1, 0x35 }, |
| 287 |
{1680, 1280, 72,128, 831, 800, 3, 6, VCLK83_5, |
| 288 |
(SyncPN | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 60, 2, 0x35 }, |
| 289 |
{1680, 1280, 72,128, 831, 800, 3, 6, VCLK83_5, |
| 290 |
(SyncPN | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 0xFF, 2, 0x35 }, |
| 291 |
|
| 292 |
}; |
| 293 |
|
| 294 |
static const struct ast_vbios_enhtable res_1440x900[] = { |
| 295 |
{1600, 1440, 48, 32, 926, 900, 3, 6, VCLK88_75, |
| 296 |
(SyncNP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 297 |
AST2500PreCatchCRT), 60, 1, 0x36 }, |
| 298 |
{1904, 1440, 80,152, 934, 900, 3, 6, VCLK106_5, |
| 299 |
(SyncPN | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 60, 2, 0x36 }, |
| 300 |
{1904, 1440, 80,152, 934, 900, 3, 6, VCLK106_5, |
| 301 |
(SyncPN | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 0xFF, 2, 0x36 }, |
| 302 |
}; |
| 303 |
|
| 304 |
static const struct ast_vbios_enhtable res_1680x1050[] = { |
| 305 |
{1840, 1680, 48, 32, 1080, 1050, 3, 6, VCLK119, |
| 306 |
(SyncNP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 307 |
AST2500PreCatchCRT), 60, 1, 0x37 }, |
| 308 |
{2240, 1680,104,176, 1089, 1050, 3, 6, VCLK146_25, |
| 309 |
(SyncPN | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 60, 2, 0x37 }, |
| 310 |
{2240, 1680,104,176, 1089, 1050, 3, 6, VCLK146_25, |
| 311 |
(SyncPN | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo), 0xFF, 2, 0x37 }, |
| 312 |
}; |
| 313 |
|
| 314 |
static const struct ast_vbios_enhtable res_1920x1200[] = { |
| 315 |
{2080, 1920, 48, 32, 1235, 1200, 3, 6, VCLK154, |
| 316 |
(SyncNP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 317 |
AST2500PreCatchCRT), 60, 1, 0x34 }, |
| 318 |
{2080, 1920, 48, 32, 1235, 1200, 3, 6, VCLK154, |
| 319 |
(SyncNP | Charx8Dot | LineCompareOff | WideScreenMode | NewModeInfo | |
| 320 |
AST2500PreCatchCRT), 0xFF, 1, 0x34 }, |
| 321 |
}; |
| 322 |
#endif |