Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. |
| 3 | * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. |
| 4 | |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public |
| 7 | * License as published by the Free Software Foundation; |
| 8 | * either version 2, or (at your option) any later version. |
| 9 | |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even |
| 12 | * the implied warranty of MERCHANTABILITY or FITNESS FOR |
| 13 | * A PARTICULAR PURPOSE.See the GNU General Public License |
| 14 | * for more details. |
| 15 | |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., |
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef __VIAMODE_H__ |
| 23 | #define __VIAMODE_H__ |
| 24 | |
| 25 | #include "global.h" |
| 26 | |
| 27 | struct VPITTable { |
| 28 | unsigned char Misc; |
| 29 | unsigned char SR[StdSR]; |
| 30 | unsigned char GR[StdGR]; |
| 31 | unsigned char AR[StdAR]; |
| 32 | }; |
| 33 | |
| 34 | struct VideoModeTable { |
| 35 | int ModeIndex; |
| 36 | struct crt_mode_table *crtc; |
| 37 | int mode_array; |
| 38 | }; |
| 39 | |
| 40 | struct patch_table { |
| 41 | int mode_index; |
| 42 | int table_length; |
| 43 | struct io_reg *io_reg_table; |
| 44 | }; |
| 45 | |
| 46 | struct res_map_refresh { |
| 47 | int hres; |
| 48 | int vres; |
| 49 | int pixclock; |
| 50 | int vmode_refresh; |
| 51 | }; |
| 52 | |
| 53 | #define NUM_TOTAL_RES_MAP_REFRESH ARRAY_SIZE(res_map_refresh_tbl) |
| 54 | #define NUM_TOTAL_CEA_MODES ARRAY_SIZE(CEA_HDMI_Modes) |
| 55 | #define NUM_TOTAL_CN400_ModeXregs ARRAY_SIZE(CN400_ModeXregs) |
| 56 | #define NUM_TOTAL_CN700_ModeXregs ARRAY_SIZE(CN700_ModeXregs) |
| 57 | #define NUM_TOTAL_KM400_ModeXregs ARRAY_SIZE(KM400_ModeXregs) |
| 58 | #define NUM_TOTAL_CX700_ModeXregs ARRAY_SIZE(CX700_ModeXregs) |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 59 | #define NUM_TOTAL_CLE266_ModeXregs ARRAY_SIZE(CLE266_ModeXregs) |
| 60 | #define NUM_TOTAL_PATCH_MODE ARRAY_SIZE(res_patch_table) |
| 61 | #define NUM_TOTAL_MODETABLE ARRAY_SIZE(CLE266Modes) |
| 62 | |
| 63 | /********************/ |
| 64 | /* Mode Table */ |
| 65 | /********************/ |
| 66 | |
| 67 | /* 480x640 */ |
| 68 | extern struct crt_mode_table CRTM480x640[1]; |
| 69 | /* 640x480*/ |
| 70 | extern struct crt_mode_table CRTM640x480[5]; |
| 71 | /*720x480 (GTF)*/ |
| 72 | extern struct crt_mode_table CRTM720x480[1]; |
| 73 | /*720x576 (GTF)*/ |
| 74 | extern struct crt_mode_table CRTM720x576[1]; |
| 75 | /* 800x480 (CVT) */ |
| 76 | extern struct crt_mode_table CRTM800x480[1]; |
| 77 | /* 800x600*/ |
| 78 | extern struct crt_mode_table CRTM800x600[5]; |
| 79 | /* 848x480 (CVT) */ |
| 80 | extern struct crt_mode_table CRTM848x480[1]; |
| 81 | /*856x480 (GTF) convert to 852x480*/ |
| 82 | extern struct crt_mode_table CRTM852x480[1]; |
| 83 | /*1024x512 (GTF)*/ |
| 84 | extern struct crt_mode_table CRTM1024x512[1]; |
| 85 | /* 1024x600*/ |
| 86 | extern struct crt_mode_table CRTM1024x600[1]; |
| 87 | /* 1024x768*/ |
| 88 | extern struct crt_mode_table CRTM1024x768[4]; |
| 89 | /* 1152x864*/ |
| 90 | extern struct crt_mode_table CRTM1152x864[1]; |
| 91 | /* 1280x720 (HDMI 720P)*/ |
| 92 | extern struct crt_mode_table CRTM1280x720[2]; |
| 93 | /*1280x768 (GTF)*/ |
| 94 | extern struct crt_mode_table CRTM1280x768[2]; |
| 95 | /* 1280x800 (CVT) */ |
| 96 | extern struct crt_mode_table CRTM1280x800[1]; |
| 97 | /*1280x960*/ |
| 98 | extern struct crt_mode_table CRTM1280x960[1]; |
| 99 | /* 1280x1024*/ |
| 100 | extern struct crt_mode_table CRTM1280x1024[3]; |
| 101 | /* 1368x768 (GTF) */ |
| 102 | extern struct crt_mode_table CRTM1368x768[1]; |
| 103 | /*1440x1050 (GTF)*/ |
| 104 | extern struct crt_mode_table CRTM1440x1050[1]; |
| 105 | /* 1600x1200*/ |
| 106 | extern struct crt_mode_table CRTM1600x1200[2]; |
| 107 | /* 1680x1050 (CVT) */ |
| 108 | extern struct crt_mode_table CRTM1680x1050[2]; |
| 109 | /* 1680x1050 (CVT Reduce Blanking) */ |
| 110 | extern struct crt_mode_table CRTM1680x1050_RB[1]; |
| 111 | /* 1920x1080 (CVT)*/ |
| 112 | extern struct crt_mode_table CRTM1920x1080[1]; |
| 113 | /* 1920x1080 (CVT with Reduce Blanking) */ |
| 114 | extern struct crt_mode_table CRTM1920x1080_RB[1]; |
| 115 | /* 1920x1440*/ |
| 116 | extern struct crt_mode_table CRTM1920x1440[2]; |
| 117 | /* 1400x1050 (CVT) */ |
| 118 | extern struct crt_mode_table CRTM1400x1050[2]; |
| 119 | /* 1400x1050 (CVT Reduce Blanking) */ |
| 120 | extern struct crt_mode_table CRTM1400x1050_RB[1]; |
| 121 | /* 960x600 (CVT) */ |
| 122 | extern struct crt_mode_table CRTM960x600[1]; |
| 123 | /* 1000x600 (GTF) */ |
| 124 | extern struct crt_mode_table CRTM1000x600[1]; |
| 125 | /* 1024x576 (GTF) */ |
| 126 | extern struct crt_mode_table CRTM1024x576[1]; |
| 127 | /* 1088x612 (CVT) */ |
| 128 | extern struct crt_mode_table CRTM1088x612[1]; |
| 129 | /* 1152x720 (CVT) */ |
| 130 | extern struct crt_mode_table CRTM1152x720[1]; |
| 131 | /* 1200x720 (GTF) */ |
| 132 | extern struct crt_mode_table CRTM1200x720[1]; |
| 133 | /* 1280x600 (GTF) */ |
| 134 | extern struct crt_mode_table CRTM1280x600[1]; |
| 135 | /* 1360x768 (CVT) */ |
| 136 | extern struct crt_mode_table CRTM1360x768[1]; |
| 137 | /* 1360x768 (CVT Reduce Blanking) */ |
| 138 | extern struct crt_mode_table CRTM1360x768_RB[1]; |
| 139 | /* 1366x768 (GTF) */ |
| 140 | extern struct crt_mode_table CRTM1366x768[2]; |
| 141 | /* 1440x900 (CVT) */ |
| 142 | extern struct crt_mode_table CRTM1440x900[2]; |
| 143 | /* 1440x900 (CVT Reduce Blanking) */ |
| 144 | extern struct crt_mode_table CRTM1440x900_RB[1]; |
| 145 | /* 1600x900 (CVT) */ |
| 146 | extern struct crt_mode_table CRTM1600x900[1]; |
| 147 | /* 1600x900 (CVT Reduce Blanking) */ |
| 148 | extern struct crt_mode_table CRTM1600x900_RB[1]; |
| 149 | /* 1600x1024 (GTF) */ |
| 150 | extern struct crt_mode_table CRTM1600x1024[1]; |
| 151 | /* 1792x1344 (DMT) */ |
| 152 | extern struct crt_mode_table CRTM1792x1344[1]; |
| 153 | /* 1856x1392 (DMT) */ |
| 154 | extern struct crt_mode_table CRTM1856x1392[1]; |
| 155 | /* 1920x1200 (CVT) */ |
| 156 | extern struct crt_mode_table CRTM1920x1200[1]; |
| 157 | /* 1920x1200 (CVT with Reduce Blanking) */ |
| 158 | extern struct crt_mode_table CRTM1920x1200_RB[1]; |
| 159 | /* 2048x1536 (CVT) */ |
| 160 | extern struct crt_mode_table CRTM2048x1536[1]; |
| 161 | extern struct VideoModeTable CLE266Modes[47]; |
| 162 | extern struct crt_mode_table CEAM1280x720[1]; |
| 163 | extern struct crt_mode_table CEAM1920x1080[1]; |
| 164 | extern struct VideoModeTable CEA_HDMI_Modes[2]; |
| 165 | |
| 166 | extern struct res_map_refresh res_map_refresh_tbl[61]; |
| 167 | extern struct io_reg CN400_ModeXregs[52]; |
| 168 | extern struct io_reg CN700_ModeXregs[66]; |
| 169 | extern struct io_reg KM400_ModeXregs[55]; |
| 170 | extern struct io_reg CX700_ModeXregs[58]; |
| 171 | extern struct io_reg VX800_ModeXregs[58]; |
| 172 | extern struct io_reg CLE266_ModeXregs[32]; |
| 173 | extern struct io_reg PM1024x768[2]; |
| 174 | extern struct patch_table res_patch_table[1]; |
| 175 | extern struct VPITTable VPIT; |
| 176 | #endif /* __VIAMODE_H__ */ |