blob: e550063b89b1c96a609834ff6c01326eb7329a0e [file] [log] [blame]
Joseph Chan9f291632008-10-15 22:03:29 -07001/*
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
Jonathan Corbetec668412010-05-05 14:44:55 -060022#include <linux/via-core.h>
Joseph Chan9f291632008-10-15 22:03:29 -070023#include "global.h"
Joseph Chan9f291632008-10-15 22:03:29 -070024
25struct io_reg CN400_ModeXregs[] = { {VIASR, SR10, 0xFF, 0x01},
26{VIASR, SR15, 0x02, 0x02},
27{VIASR, SR16, 0xBF, 0x08},
28{VIASR, SR17, 0xFF, 0x1F},
29{VIASR, SR18, 0xFF, 0x4E},
30{VIASR, SR1A, 0xFB, 0x08},
31{VIASR, SR1E, 0x0F, 0x01},
32{VIASR, SR2A, 0xFF, 0x00},
33{VIACR, CR0A, 0xFF, 0x1E}, /* Cursor Start */
34{VIACR, CR0B, 0xFF, 0x00}, /* Cursor End */
35{VIACR, CR0E, 0xFF, 0x00}, /* Cursor Location High */
36{VIACR, CR0F, 0xFF, 0x00}, /* Cursor Localtion Low */
37{VIACR, CR32, 0xFF, 0x00},
38{VIACR, CR33, 0xFF, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -070039{VIACR, CR35, 0xFF, 0x00},
40{VIACR, CR36, 0x08, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -070041{VIACR, CR69, 0xFF, 0x00},
42{VIACR, CR6A, 0xFF, 0x40},
43{VIACR, CR6B, 0xFF, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -070044{VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */
45{VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */
46{VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */
47{VIACR, CR8B, 0xFF, 0x69}, /* LCD Power Sequence Control 0 */
48{VIACR, CR8C, 0xFF, 0x57}, /* LCD Power Sequence Control 1 */
49{VIACR, CR8D, 0xFF, 0x00}, /* LCD Power Sequence Control 2 */
50{VIACR, CR8E, 0xFF, 0x7B}, /* LCD Power Sequence Control 3 */
51{VIACR, CR8F, 0xFF, 0x03}, /* LCD Power Sequence Control 4 */
52{VIACR, CR90, 0xFF, 0x30}, /* LCD Power Sequence Control 5 */
53{VIACR, CR91, 0xFF, 0xA0}, /* 24/12 bit LVDS Data off */
54{VIACR, CR96, 0xFF, 0x00},
55{VIACR, CR97, 0xFF, 0x00},
56{VIACR, CR99, 0xFF, 0x00},
57{VIACR, CR9B, 0xFF, 0x00}
58};
59
60/* Video Mode Table for VT3314 chipset*/
61/* Common Setting for Video Mode */
62struct io_reg CN700_ModeXregs[] = { {VIASR, SR10, 0xFF, 0x01},
63{VIASR, SR15, 0x02, 0x02},
64{VIASR, SR16, 0xBF, 0x08},
65{VIASR, SR17, 0xFF, 0x1F},
66{VIASR, SR18, 0xFF, 0x4E},
67{VIASR, SR1A, 0xFB, 0x82},
68{VIASR, SR1B, 0xFF, 0xF0},
69{VIASR, SR1F, 0xFF, 0x00},
70{VIASR, SR1E, 0xFF, 0x01},
71{VIASR, SR22, 0xFF, 0x1F},
72{VIASR, SR2A, 0x0F, 0x00},
73{VIASR, SR2E, 0xFF, 0xFF},
74{VIASR, SR3F, 0xFF, 0xFF},
75{VIASR, SR40, 0xF7, 0x00},
76{VIASR, CR30, 0xFF, 0x04},
77{VIACR, CR32, 0xFF, 0x00},
78{VIACR, CR33, 0x7F, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -070079{VIACR, CR35, 0xFF, 0x00},
80{VIACR, CR36, 0xFF, 0x31},
81{VIACR, CR41, 0xFF, 0x80},
82{VIACR, CR42, 0xFF, 0x00},
83{VIACR, CR55, 0x80, 0x00},
84{VIACR, CR5D, 0x80, 0x00}, /*Horizontal Retrace Start bit[11] should be 0*/
Joseph Chan9f291632008-10-15 22:03:29 -070085{VIACR, CR68, 0xFF, 0x67}, /* Default FIFO For IGA2 */
86{VIACR, CR69, 0xFF, 0x00},
87{VIACR, CR6A, 0xFD, 0x40},
88{VIACR, CR6B, 0xFF, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -070089{VIACR, CR77, 0xFF, 0x00}, /* LCD scaling Factor */
90{VIACR, CR78, 0xFF, 0x00}, /* LCD scaling Factor */
91{VIACR, CR79, 0xFF, 0x00}, /* LCD scaling Factor */
92{VIACR, CR9F, 0x03, 0x00}, /* LCD scaling Factor */
Joseph Chan9f291632008-10-15 22:03:29 -070093{VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */
94{VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */
95{VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */
96{VIACR, CR8B, 0xFF, 0x5D}, /* LCD Power Sequence Control 0 */
97{VIACR, CR8C, 0xFF, 0x2B}, /* LCD Power Sequence Control 1 */
98{VIACR, CR8D, 0xFF, 0x6F}, /* LCD Power Sequence Control 2 */
99{VIACR, CR8E, 0xFF, 0x2B}, /* LCD Power Sequence Control 3 */
100{VIACR, CR8F, 0xFF, 0x01}, /* LCD Power Sequence Control 4 */
101{VIACR, CR90, 0xFF, 0x01}, /* LCD Power Sequence Control 5 */
102{VIACR, CR91, 0xFF, 0xA0}, /* 24/12 bit LVDS Data off */
103{VIACR, CR96, 0xFF, 0x00},
104{VIACR, CR97, 0xFF, 0x00},
105{VIACR, CR99, 0xFF, 0x00},
106{VIACR, CR9B, 0xFF, 0x00},
107{VIACR, CR9D, 0xFF, 0x80},
108{VIACR, CR9E, 0xFF, 0x80}
109};
110
111struct io_reg KM400_ModeXregs[] = {
112 {VIASR, SR10, 0xFF, 0x01}, /* Unlock Register */
113 {VIASR, SR16, 0xFF, 0x08}, /* Display FIFO threshold Control */
114 {VIASR, SR17, 0xFF, 0x1F}, /* Display FIFO Control */
115 {VIASR, SR18, 0xFF, 0x4E}, /* GFX PREQ threshold */
116 {VIASR, SR1A, 0xFF, 0x0a}, /* GFX PREQ threshold */
117 {VIASR, SR1F, 0xFF, 0x00}, /* Memory Control 0 */
118 {VIASR, SR1B, 0xFF, 0xF0}, /* Power Management Control 0 */
119 {VIASR, SR1E, 0xFF, 0x01}, /* Power Management Control */
120 {VIASR, SR20, 0xFF, 0x00}, /* Sequencer Arbiter Control 0 */
121 {VIASR, SR21, 0xFF, 0x00}, /* Sequencer Arbiter Control 1 */
122 {VIASR, SR22, 0xFF, 0x1F}, /* Display Arbiter Control 1 */
123 {VIASR, SR2A, 0xFF, 0x00}, /* Power Management Control 5 */
124 {VIASR, SR2D, 0xFF, 0xFF}, /* Power Management Control 1 */
125 {VIASR, SR2E, 0xFF, 0xFF}, /* Power Management Control 2 */
126 {VIACR, CR0A, 0xFF, 0x1E}, /* Cursor Start */
127 {VIACR, CR0B, 0xFF, 0x00}, /* Cursor End */
128 {VIACR, CR0E, 0xFF, 0x00}, /* Cursor Location High */
129 {VIACR, CR0F, 0xFF, 0x00}, /* Cursor Localtion Low */
130 {VIACR, CR33, 0xFF, 0x00},
131 {VIACR, CR55, 0x80, 0x00},
132 {VIACR, CR5D, 0x80, 0x00},
133 {VIACR, CR36, 0xFF, 0x01}, /* Power Mangement 3 */
Joseph Chan9f291632008-10-15 22:03:29 -0700134 {VIACR, CR68, 0xFF, 0x67}, /* Default FIFO For IGA2 */
135 {VIACR, CR6A, 0x20, 0x20}, /* Extended FIFO On */
Joseph Chan9f291632008-10-15 22:03:29 -0700136 {VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */
137 {VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */
138 {VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */
139 {VIACR, CR8B, 0xFF, 0x2D}, /* LCD Power Sequence Control 0 */
140 {VIACR, CR8C, 0xFF, 0x2D}, /* LCD Power Sequence Control 1 */
141 {VIACR, CR8D, 0xFF, 0xC8}, /* LCD Power Sequence Control 2 */
142 {VIACR, CR8E, 0xFF, 0x36}, /* LCD Power Sequence Control 3 */
143 {VIACR, CR8F, 0xFF, 0x00}, /* LCD Power Sequence Control 4 */
144 {VIACR, CR90, 0xFF, 0x10}, /* LCD Power Sequence Control 5 */
145 {VIACR, CR91, 0xFF, 0xA0}, /* 24/12 bit LVDS Data off */
146 {VIACR, CR96, 0xFF, 0x03}, /* DVP0 ; DVP0 Clock Skew */
147 {VIACR, CR97, 0xFF, 0x03}, /* DFP high ; DFPH Clock Skew */
148 {VIACR, CR99, 0xFF, 0x03}, /* DFP low ; DFPL Clock Skew*/
149 {VIACR, CR9B, 0xFF, 0x07} /* DVI on DVP1 ; DVP1 Clock Skew*/
150};
151
152/* For VT3324: Common Setting for Video Mode */
153struct io_reg CX700_ModeXregs[] = { {VIASR, SR10, 0xFF, 0x01},
154{VIASR, SR15, 0x02, 0x02},
155{VIASR, SR16, 0xBF, 0x08},
156{VIASR, SR17, 0xFF, 0x1F},
157{VIASR, SR18, 0xFF, 0x4E},
158{VIASR, SR1A, 0xFB, 0x08},
159{VIASR, SR1B, 0xFF, 0xF0},
160{VIASR, SR1E, 0xFF, 0x01},
161{VIASR, SR2A, 0xFF, 0x00},
Florian Tobias Schandinat4d9fd0b2011-03-26 03:17:42 +0000162{VIASR, SR2D, 0xC0, 0xC0}, /* delayed E3_ECK */
Joseph Chan9f291632008-10-15 22:03:29 -0700163{VIACR, CR0A, 0xFF, 0x1E}, /* Cursor Start */
164{VIACR, CR0B, 0xFF, 0x00}, /* Cursor End */
165{VIACR, CR0E, 0xFF, 0x00}, /* Cursor Location High */
166{VIACR, CR0F, 0xFF, 0x00}, /* Cursor Localtion Low */
167{VIACR, CR32, 0xFF, 0x00},
168{VIACR, CR33, 0xFF, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -0700169{VIACR, CR35, 0xFF, 0x00},
170{VIACR, CR36, 0x08, 0x00},
171{VIACR, CR47, 0xC8, 0x00}, /* Clear VCK Plus. */
Joseph Chan9f291632008-10-15 22:03:29 -0700172{VIACR, CR69, 0xFF, 0x00},
173{VIACR, CR6A, 0xFF, 0x40},
174{VIACR, CR6B, 0xFF, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -0700175{VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */
176{VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */
177{VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */
178{VIACR, CRD4, 0xFF, 0x81}, /* Second power sequence control */
179{VIACR, CR8B, 0xFF, 0x5D}, /* LCD Power Sequence Control 0 */
180{VIACR, CR8C, 0xFF, 0x2B}, /* LCD Power Sequence Control 1 */
181{VIACR, CR8D, 0xFF, 0x6F}, /* LCD Power Sequence Control 2 */
182{VIACR, CR8E, 0xFF, 0x2B}, /* LCD Power Sequence Control 3 */
183{VIACR, CR8F, 0xFF, 0x01}, /* LCD Power Sequence Control 4 */
184{VIACR, CR90, 0xFF, 0x01}, /* LCD Power Sequence Control 5 */
185{VIACR, CR91, 0xFF, 0x80}, /* 24/12 bit LVDS Data off */
186{VIACR, CR96, 0xFF, 0x00},
187{VIACR, CR97, 0xFF, 0x00},
188{VIACR, CR99, 0xFF, 0x00},
Florian Tobias Schandinat8594ac32009-09-22 16:47:22 -0700189{VIACR, CR9B, 0xFF, 0x00}
Joseph Chan9f291632008-10-15 22:03:29 -0700190};
191
Harald Welte0306ab12009-09-22 16:47:35 -0700192struct io_reg VX855_ModeXregs[] = {
193{VIASR, SR10, 0xFF, 0x01},
194{VIASR, SR15, 0x02, 0x02},
195{VIASR, SR16, 0xBF, 0x08},
196{VIASR, SR17, 0xFF, 0x1F},
197{VIASR, SR18, 0xFF, 0x4E},
198{VIASR, SR1A, 0xFB, 0x08},
199{VIASR, SR1B, 0xFF, 0xF0},
200{VIASR, SR1E, 0x07, 0x01},
201{VIASR, SR2A, 0xF0, 0x00},
202{VIASR, SR58, 0xFF, 0x00},
203{VIASR, SR59, 0xFF, 0x00},
Florian Tobias Schandinat4d9fd0b2011-03-26 03:17:42 +0000204{VIASR, SR2D, 0xC0, 0xC0}, /* delayed E3_ECK */
Harald Welte0306ab12009-09-22 16:47:35 -0700205{VIACR, CR09, 0xFF, 0x00}, /* Initial CR09=0*/
206{VIACR, CR11, 0x8F, 0x00}, /* IGA1 initial Vertical end */
207{VIACR, CR17, 0x7F, 0x00}, /* IGA1 CRT Mode control init */
208{VIACR, CR0A, 0xFF, 0x1E}, /* Cursor Start */
209{VIACR, CR0B, 0xFF, 0x00}, /* Cursor End */
210{VIACR, CR0E, 0xFF, 0x00}, /* Cursor Location High */
211{VIACR, CR0F, 0xFF, 0x00}, /* Cursor Localtion Low */
212{VIACR, CR32, 0xFF, 0x00},
213{VIACR, CR33, 0x7F, 0x00},
214{VIACR, CR35, 0xFF, 0x00},
215{VIACR, CR36, 0x08, 0x00},
216{VIACR, CR69, 0xFF, 0x00},
217{VIACR, CR6A, 0xFD, 0x60},
218{VIACR, CR6B, 0xFF, 0x00},
Harald Welte0306ab12009-09-22 16:47:35 -0700219{VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */
220{VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */
221{VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */
222{VIACR, CRD4, 0xFF, 0x81}, /* Second power sequence control */
223{VIACR, CR91, 0xFF, 0x80}, /* 24/12 bit LVDS Data off */
224{VIACR, CR96, 0xFF, 0x00},
225{VIACR, CR97, 0xFF, 0x00},
226{VIACR, CR99, 0xFF, 0x00},
227{VIACR, CR9B, 0xFF, 0x00},
228{VIACR, CRD2, 0xFF, 0xFF} /* TMDS/LVDS control register. */
229};
230
Joseph Chan9f291632008-10-15 22:03:29 -0700231/* Video Mode Table */
232/* Common Setting for Video Mode */
233struct io_reg CLE266_ModeXregs[] = { {VIASR, SR1E, 0xF0, 0x00},
234{VIASR, SR2A, 0x0F, 0x00},
235{VIASR, SR15, 0x02, 0x02},
236{VIASR, SR16, 0xBF, 0x08},
237{VIASR, SR17, 0xFF, 0x1F},
238{VIASR, SR18, 0xFF, 0x4E},
239{VIASR, SR1A, 0xFB, 0x08},
240
241{VIACR, CR32, 0xFF, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -0700242{VIACR, CR35, 0xFF, 0x00},
243{VIACR, CR36, 0x08, 0x00},
244{VIACR, CR6A, 0xFF, 0x80},
245{VIACR, CR6A, 0xFF, 0xC0},
246
247{VIACR, CR55, 0x80, 0x00},
248{VIACR, CR5D, 0x80, 0x00},
249
250{VIAGR, GR20, 0xFF, 0x00},
251{VIAGR, GR21, 0xFF, 0x00},
252{VIAGR, GR22, 0xFF, 0x00},
Joseph Chan9f291632008-10-15 22:03:29 -0700253
254};
255
256/* Mode:1024X768 */
257struct io_reg PM1024x768[] = { {VIASR, 0x16, 0xBF, 0x0C},
258{VIASR, 0x18, 0xFF, 0x4C}
259};
260
261struct patch_table res_patch_table[] = {
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800262 {ARRAY_SIZE(PM1024x768), PM1024x768}
Joseph Chan9f291632008-10-15 22:03:29 -0700263};
264
265/* struct VPITTable {
266 unsigned char Misc;
267 unsigned char SR[StdSR];
268 unsigned char CR[StdCR];
269 unsigned char GR[StdGR];
270 unsigned char AR[StdAR];
271 };*/
272
273struct VPITTable VPIT = {
274 /* Msic */
275 0xC7,
276 /* Sequencer */
277 {0x01, 0x0F, 0x00, 0x0E},
278 /* Graphic Controller */
279 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0F, 0xFF},
280 /* Attribute Controller */
281 {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
282 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
283 0x01, 0x00, 0x0F, 0x00}
284};
285
286/********************/
287/* Mode Table */
288/********************/
289
290/* 480x640 */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800291static struct crt_mode_table CRTM480x640[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000292 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700293 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000294 {REFRESH_60, M480X640_R60_HSP, M480X640_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700295 {624, 480, 480, 144, 504, 48, 663, 640, 640, 23, 641, 3} } /* GTF*/
296};
297
298/* 640x480*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800299static struct crt_mode_table CRTM640x480[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000300 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700301 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000302 {REFRESH_60, M640X480_R60_HSP, M640X480_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700303 {800, 640, 648, 144, 656, 96, 525, 480, 480, 45, 490, 2} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000304 {REFRESH_75, M640X480_R75_HSP, M640X480_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700305 {840, 640, 640, 200, 656, 64, 500, 480, 480, 20, 481, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000306 {REFRESH_85, M640X480_R85_HSP, M640X480_R85_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700307 {832, 640, 640, 192, 696, 56, 509, 480, 480, 29, 481, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000308 {REFRESH_100, M640X480_R100_HSP, M640X480_R100_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700309 {848, 640, 640, 208, 680, 64, 509, 480, 480, 29, 481, 3} }, /*GTF*/
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000310 {REFRESH_120, M640X480_R120_HSP, M640X480_R120_VSP,
311 {848, 640, 640, 208, 680, 64, 515, 480, 480, 35, 481, 3} } /*GTF*/
Joseph Chan9f291632008-10-15 22:03:29 -0700312};
313
314/*720x480 (GTF)*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800315static struct crt_mode_table CRTM720x480[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000316 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700317 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000318 {REFRESH_60, M720X480_R60_HSP, M720X480_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700319 {896, 720, 720, 176, 736, 72, 497, 480, 480, 17, 481, 3} }
320
321};
322
323/*720x576 (GTF)*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800324static struct crt_mode_table CRTM720x576[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000325 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700326 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000327 {REFRESH_60, M720X576_R60_HSP, M720X576_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700328 {912, 720, 720, 192, 744, 72, 597, 576, 576, 21, 577, 3} }
329};
330
331/* 800x480 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800332static struct crt_mode_table CRTM800x480[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000333 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700334 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000335 {REFRESH_60, M800X480_R60_HSP, M800X480_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700336 {992, 800, 800, 192, 824, 72, 500, 480, 480, 20, 483, 7} }
337};
338
339/* 800x600*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800340static struct crt_mode_table CRTM800x600[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000341 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700342 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000343 {REFRESH_60, M800X600_R60_HSP, M800X600_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700344 {1056, 800, 800, 256, 840, 128, 628, 600, 600, 28, 601, 4} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000345 {REFRESH_75, M800X600_R75_HSP, M800X600_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700346 {1056, 800, 800, 256, 816, 80, 625, 600, 600, 25, 601, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000347 {REFRESH_85, M800X600_R85_HSP, M800X600_R85_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700348 {1048, 800, 800, 248, 832, 64, 631, 600, 600, 31, 601, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000349 {REFRESH_100, M800X600_R100_HSP, M800X600_R100_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700350 {1072, 800, 800, 272, 848, 88, 636, 600, 600, 36, 601, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000351 {REFRESH_120, M800X600_R120_HSP, M800X600_R120_VSP,
352 {1088, 800, 800, 288, 856, 88, 643, 600, 600, 43, 601, 3} }
Joseph Chan9f291632008-10-15 22:03:29 -0700353};
354
355/* 848x480 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800356static struct crt_mode_table CRTM848x480[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000357 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700358 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000359 {REFRESH_60, M848X480_R60_HSP, M848X480_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700360 {1056, 848, 848, 208, 872, 80, 500, 480, 480, 20, 483, 5} }
361};
362
363/*856x480 (GTF) convert to 852x480*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800364static struct crt_mode_table CRTM852x480[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000365 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700366 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000367 {REFRESH_60, M852X480_R60_HSP, M852X480_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700368 {1064, 856, 856, 208, 872, 88, 497, 480, 480, 17, 481, 3} }
369};
370
371/*1024x512 (GTF)*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800372static struct crt_mode_table CRTM1024x512[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000373 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700374 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000375 {REFRESH_60, M1024X512_R60_HSP, M1024X512_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700376 {1296, 1024, 1024, 272, 1056, 104, 531, 512, 512, 19, 513, 3} }
377
378};
379
380/* 1024x600*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800381static struct crt_mode_table CRTM1024x600[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000382 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700383 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000384 {REFRESH_60, M1024X600_R60_HSP, M1024X600_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700385 {1312, 1024, 1024, 288, 1064, 104, 622, 600, 600, 22, 601, 3} },
386};
387
388/* 1024x768*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800389static struct crt_mode_table CRTM1024x768[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000390 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700391 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000392 {REFRESH_60, M1024X768_R60_HSP, M1024X768_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700393 {1344, 1024, 1024, 320, 1048, 136, 806, 768, 768, 38, 771, 6} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000394 {REFRESH_75, M1024X768_R75_HSP, M1024X768_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700395 {1312, 1024, 1024, 288, 1040, 96, 800, 768, 768, 32, 769, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000396 {REFRESH_85, M1024X768_R85_HSP, M1024X768_R85_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700397 {1376, 1024, 1024, 352, 1072, 96, 808, 768, 768, 40, 769, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000398 {REFRESH_100, M1024X768_R100_HSP, M1024X768_R100_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700399 {1392, 1024, 1024, 368, 1096, 112, 814, 768, 768, 46, 769, 3} }
400};
401
402/* 1152x864*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800403static struct crt_mode_table CRTM1152x864[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000404 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700405 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000406 {REFRESH_75, M1152X864_R75_HSP, M1152X864_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700407 {1600, 1152, 1152, 448, 1216, 128, 900, 864, 864, 36, 865, 3} }
408
409};
410
411/* 1280x720 (HDMI 720P)*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800412static struct crt_mode_table CRTM1280x720[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000413 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700414 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000415 {REFRESH_60, M1280X720_R60_HSP, M1280X720_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700416 {1648, 1280, 1280, 368, 1392, 40, 750, 720, 720, 30, 725, 5} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000417 {REFRESH_50, M1280X720_R50_HSP, M1280X720_R50_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700418 {1632, 1280, 1280, 352, 1328, 128, 741, 720, 720, 21, 721, 3} }
419};
420
421/*1280x768 (GTF)*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800422static struct crt_mode_table CRTM1280x768[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000423 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700424 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000425 {REFRESH_60, M1280X768_R60_HSP, M1280X768_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700426 {1680, 1280, 1280, 400, 1344, 136, 795, 768, 768, 27, 769, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000427 {REFRESH_50, M1280X768_R50_HSP, M1280X768_R50_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700428 {1648, 1280, 1280, 368, 1336, 128, 791, 768, 768, 23, 769, 3} }
429};
430
431/* 1280x800 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800432static struct crt_mode_table CRTM1280x800[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000433 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700434 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000435 {REFRESH_60, M1280X800_R60_HSP, M1280X800_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700436 {1680, 1280, 1280, 400, 1352, 128, 831, 800, 800, 31, 803, 6} }
437};
438
439/*1280x960*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800440static struct crt_mode_table CRTM1280x960[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000441 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700442 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000443 {REFRESH_60, M1280X960_R60_HSP, M1280X960_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700444 {1800, 1280, 1280, 520, 1376, 112, 1000, 960, 960, 40, 961, 3} }
445};
446
447/* 1280x1024*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800448static struct crt_mode_table CRTM1280x1024[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000449 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700450 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000451 {REFRESH_60, M1280X1024_R60_HSP, M1280X1024_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700452 {1688, 1280, 1280, 408, 1328, 112, 1066, 1024, 1024, 42, 1025,
453 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000454 {REFRESH_75, M1280X1024_R75_HSP, M1280X1024_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700455 {1688, 1280, 1280, 408, 1296, 144, 1066, 1024, 1024, 42, 1025,
456 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000457 {REFRESH_85, M1280X1024_R85_HSP, M1280X1024_R85_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700458 {1728, 1280, 1280, 448, 1344, 160, 1072, 1024, 1024, 48, 1025, 3} }
459};
460
461/* 1368x768 (GTF) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800462static struct crt_mode_table CRTM1368x768[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000463 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700464 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000465 {REFRESH_60, M1368X768_R60_HSP, M1368X768_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700466 {1800, 1368, 1368, 432, 1440, 144, 795, 768, 768, 27, 769, 3} }
467};
468
469/*1440x1050 (GTF)*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800470static struct crt_mode_table CRTM1440x1050[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000471 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700472 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000473 {REFRESH_60, M1440X1050_R60_HSP, M1440X1050_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700474 {1936, 1440, 1440, 496, 1536, 152, 1077, 1040, 1040, 37, 1041, 3} }
475};
476
477/* 1600x1200*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800478static struct crt_mode_table CRTM1600x1200[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000479 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700480 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000481 {REFRESH_60, M1600X1200_R60_HSP, M1600X1200_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700482 {2160, 1600, 1600, 560, 1664, 192, 1250, 1200, 1200, 50, 1201,
483 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000484 {REFRESH_75, M1600X1200_R75_HSP, M1600X1200_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700485 {2160, 1600, 1600, 560, 1664, 192, 1250, 1200, 1200, 50, 1201, 3} }
486
487};
488
489/* 1680x1050 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800490static struct crt_mode_table CRTM1680x1050[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000491 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700492 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000493 {REFRESH_60, M1680x1050_R60_HSP, M1680x1050_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700494 {2240, 1680, 1680, 560, 1784, 176, 1089, 1050, 1050, 39, 1053,
495 6} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000496 {REFRESH_75, M1680x1050_R75_HSP, M1680x1050_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700497 {2272, 1680, 1680, 592, 1800, 176, 1099, 1050, 1050, 49, 1053, 6} }
498};
499
500/* 1680x1050 (CVT Reduce Blanking) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800501static struct crt_mode_table CRTM1680x1050_RB[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000502 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700503 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000504 {REFRESH_60, M1680x1050_RB_R60_HSP, M1680x1050_RB_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700505 {1840, 1680, 1680, 160, 1728, 32, 1080, 1050, 1050, 30, 1053, 6} }
506};
507
508/* 1920x1080 (CVT)*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800509static struct crt_mode_table CRTM1920x1080[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000510 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700511 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000512 {REFRESH_60, M1920X1080_R60_HSP, M1920X1080_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700513 {2576, 1920, 1920, 656, 2048, 200, 1120, 1080, 1080, 40, 1083, 5} }
514};
515
516/* 1920x1080 (CVT with Reduce Blanking) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800517static struct crt_mode_table CRTM1920x1080_RB[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000518 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700519 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000520 {REFRESH_60, M1920X1080_RB_R60_HSP, M1920X1080_RB_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700521 {2080, 1920, 1920, 160, 1968, 32, 1111, 1080, 1080, 31, 1083, 5} }
522};
523
524/* 1920x1440*/
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800525static struct crt_mode_table CRTM1920x1440[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000526 /*r_rate,hsp,vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700527 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000528 {REFRESH_60, M1920X1440_R60_HSP, M1920X1440_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700529 {2600, 1920, 1920, 680, 2048, 208, 1500, 1440, 1440, 60, 1441,
530 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000531 {REFRESH_75, M1920X1440_R75_HSP, M1920X1440_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700532 {2640, 1920, 1920, 720, 2064, 224, 1500, 1440, 1440, 60, 1441, 3} }
533};
534
535/* 1400x1050 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800536static struct crt_mode_table CRTM1400x1050[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000537 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700538 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000539 {REFRESH_60, M1400X1050_R60_HSP, M1400X1050_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700540 {1864, 1400, 1400, 464, 1488, 144, 1089, 1050, 1050, 39, 1053,
541 4} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000542 {REFRESH_75, M1400X1050_R75_HSP, M1400X1050_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700543 {1896, 1400, 1400, 496, 1504, 144, 1099, 1050, 1050, 49, 1053, 4} }
544};
545
546/* 1400x1050 (CVT Reduce Blanking) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800547static struct crt_mode_table CRTM1400x1050_RB[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000548 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700549 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000550 {REFRESH_60, M1400X1050_RB_R60_HSP, M1400X1050_RB_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700551 {1560, 1400, 1400, 160, 1448, 32, 1080, 1050, 1050, 30, 1053, 4} }
552};
553
554/* 960x600 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800555static struct crt_mode_table CRTM960x600[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000556 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700557 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000558 {REFRESH_60, M960X600_R60_HSP, M960X600_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700559 {1216, 960, 960, 256, 992, 96, 624, 600, 600, 24, 603, 6} }
560};
561
562/* 1000x600 (GTF) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800563static struct crt_mode_table CRTM1000x600[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000564 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700565 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000566 {REFRESH_60, M1000X600_R60_HSP, M1000X600_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700567 {1288, 1000, 1000, 288, 1040, 104, 622, 600, 600, 22, 601, 3} }
568};
569
570/* 1024x576 (GTF) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800571static struct crt_mode_table CRTM1024x576[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000572 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700573 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000574 {REFRESH_60, M1024X576_R60_HSP, M1024X576_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700575 {1312, 1024, 1024, 288, 1064, 104, 597, 576, 576, 21, 577, 3} }
576};
577
578/* 1088x612 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800579static struct crt_mode_table CRTM1088x612[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000580 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700581 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000582 {REFRESH_60, M1088X612_R60_HSP, M1088X612_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700583 {1392, 1088, 1088, 304, 1136, 104, 636, 612, 612, 24, 615, 5} }
584};
585
586/* 1152x720 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800587static struct crt_mode_table CRTM1152x720[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000588 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700589 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000590 {REFRESH_60, M1152X720_R60_HSP, M1152X720_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700591 {1488, 1152, 1152, 336, 1208, 112, 748, 720, 720, 28, 723, 6} }
592};
593
594/* 1200x720 (GTF) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800595static struct crt_mode_table CRTM1200x720[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000596 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700597 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000598 {REFRESH_60, M1200X720_R60_HSP, M1200X720_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700599 {1568, 1200, 1200, 368, 1256, 128, 746, 720, 720, 26, 721, 3} }
600};
601
Chris Ballc205d932009-06-07 13:59:51 -0400602/* 1200x900 (DCON) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800603static struct crt_mode_table DCON1200x900[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000604 /* r_rate, hsp, vsp */
605 {REFRESH_60, M1200X900_R60_HSP, M1200X900_R60_VSP,
Chris Ballc205d932009-06-07 13:59:51 -0400606 /* The correct htotal is 1240, but this doesn't raster on VX855. */
607 /* Via suggested changing to a multiple of 16, hence 1264. */
608 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
609 {1264, 1200, 1200, 64, 1211, 32, 912, 900, 900, 12, 901, 10} }
610};
611
Joseph Chan9f291632008-10-15 22:03:29 -0700612/* 1280x600 (GTF) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800613static struct crt_mode_table CRTM1280x600[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000614 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700615 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000616 {REFRESH_60, M1280x600_R60_HSP, M1280x600_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700617 {1648, 1280, 1280, 368, 1336, 128, 622, 600, 600, 22, 601, 3} }
618};
619
620/* 1360x768 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800621static struct crt_mode_table CRTM1360x768[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000622 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700623 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000624 {REFRESH_60, M1360X768_R60_HSP, M1360X768_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700625 {1776, 1360, 1360, 416, 1432, 136, 798, 768, 768, 30, 771, 5} }
626};
627
628/* 1360x768 (CVT Reduce Blanking) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800629static struct crt_mode_table CRTM1360x768_RB[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000630 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700631 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000632 {REFRESH_60, M1360X768_RB_R60_HSP, M1360X768_RB_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700633 {1520, 1360, 1360, 160, 1408, 32, 790, 768, 768, 22, 771, 5} }
634};
635
636/* 1366x768 (GTF) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800637static struct crt_mode_table CRTM1366x768[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000638 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700639 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000640 {REFRESH_60, M1368X768_R60_HSP, M1368X768_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700641 {1800, 1368, 1368, 432, 1440, 144, 795, 768, 768, 27, 769, 3} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000642 {REFRESH_50, M1368X768_R50_HSP, M1368X768_R50_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700643 {1768, 1368, 1368, 400, 1424, 144, 791, 768, 768, 23, 769, 3} }
644};
645
646/* 1440x900 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800647static struct crt_mode_table CRTM1440x900[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000648 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700649 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000650 {REFRESH_60, M1440X900_R60_HSP, M1440X900_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700651 {1904, 1440, 1440, 464, 1520, 152, 934, 900, 900, 34, 903, 6} },
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000652 {REFRESH_75, M1440X900_R75_HSP, M1440X900_R75_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700653 {1936, 1440, 1440, 496, 1536, 152, 942, 900, 900, 42, 903, 6} }
654};
655
656/* 1440x900 (CVT Reduce Blanking) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800657static struct crt_mode_table CRTM1440x900_RB[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000658 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700659 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000660 {REFRESH_60, M1440X900_RB_R60_HSP, M1440X900_RB_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700661 {1600, 1440, 1440, 160, 1488, 32, 926, 900, 900, 26, 903, 6} }
662};
663
664/* 1600x900 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800665static struct crt_mode_table CRTM1600x900[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000666 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700667 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000668 {REFRESH_60, M1600X900_R60_HSP, M1600X900_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700669 {2112, 1600, 1600, 512, 1688, 168, 934, 900, 900, 34, 903, 5} }
670};
671
672/* 1600x900 (CVT Reduce Blanking) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800673static struct crt_mode_table CRTM1600x900_RB[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000674 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700675 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000676 {REFRESH_60, M1600X900_RB_R60_HSP, M1600X900_RB_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700677 {1760, 1600, 1600, 160, 1648, 32, 926, 900, 900, 26, 903, 5} }
678};
679
680/* 1600x1024 (GTF) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800681static struct crt_mode_table CRTM1600x1024[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000682 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700683 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000684 {REFRESH_60, M1600X1024_R60_HSP, M1600X1024_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700685 {2144, 1600, 1600, 544, 1704, 168, 1060, 1024, 1024, 36, 1025, 3} }
686};
687
688/* 1792x1344 (DMT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800689static struct crt_mode_table CRTM1792x1344[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000690 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700691 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000692 {REFRESH_60, M1792x1344_R60_HSP, M1792x1344_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700693 {2448, 1792, 1792, 656, 1920, 200, 1394, 1344, 1344, 50, 1345, 3} }
694};
695
696/* 1856x1392 (DMT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800697static struct crt_mode_table CRTM1856x1392[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000698 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700699 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000700 {REFRESH_60, M1856x1392_R60_HSP, M1856x1392_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700701 {2528, 1856, 1856, 672, 1952, 224, 1439, 1392, 1392, 47, 1393, 3} }
702};
703
704/* 1920x1200 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800705static struct crt_mode_table CRTM1920x1200[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000706 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700707 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000708 {REFRESH_60, M1920X1200_R60_HSP, M1920X1200_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700709 {2592, 1920, 1920, 672, 2056, 200, 1245, 1200, 1200, 45, 1203, 6} }
710};
711
712/* 1920x1200 (CVT with Reduce Blanking) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800713static struct crt_mode_table CRTM1920x1200_RB[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000714 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700715 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000716 {REFRESH_60, M1920X1200_RB_R60_HSP, M1920X1200_RB_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700717 {2080, 1920, 1920, 160, 1968, 32, 1235, 1200, 1200, 35, 1203, 6} }
718};
719
720/* 2048x1536 (CVT) */
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800721static struct crt_mode_table CRTM2048x1536[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000722 /* r_rate, hsp, vsp */
Joseph Chan9f291632008-10-15 22:03:29 -0700723 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000724 {REFRESH_60, M2048x1536_R60_HSP, M2048x1536_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700725 {2800, 2048, 2048, 752, 2200, 224, 1592, 1536, 1536, 56, 1539, 4} }
726};
727
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800728static struct VideoModeTable viafb_modes[] = {
Joseph Chan9f291632008-10-15 22:03:29 -0700729 /* Display : 480x640 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800730 {CRTM480x640, ARRAY_SIZE(CRTM480x640)},
Joseph Chan9f291632008-10-15 22:03:29 -0700731
732 /* Display : 640x480 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800733 {CRTM640x480, ARRAY_SIZE(CRTM640x480)},
Joseph Chan9f291632008-10-15 22:03:29 -0700734
735 /* Display : 720x480 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800736 {CRTM720x480, ARRAY_SIZE(CRTM720x480)},
Joseph Chan9f291632008-10-15 22:03:29 -0700737
738 /* Display : 720x576 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800739 {CRTM720x576, ARRAY_SIZE(CRTM720x576)},
Joseph Chan9f291632008-10-15 22:03:29 -0700740
741 /* Display : 800x600 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800742 {CRTM800x600, ARRAY_SIZE(CRTM800x600)},
Joseph Chan9f291632008-10-15 22:03:29 -0700743
744 /* Display : 800x480 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800745 {CRTM800x480, ARRAY_SIZE(CRTM800x480)},
Joseph Chan9f291632008-10-15 22:03:29 -0700746
747 /* Display : 848x480 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800748 {CRTM848x480, ARRAY_SIZE(CRTM848x480)},
Joseph Chan9f291632008-10-15 22:03:29 -0700749
750 /* Display : 852x480 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800751 {CRTM852x480, ARRAY_SIZE(CRTM852x480)},
Joseph Chan9f291632008-10-15 22:03:29 -0700752
753 /* Display : 1024x512 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800754 {CRTM1024x512, ARRAY_SIZE(CRTM1024x512)},
Joseph Chan9f291632008-10-15 22:03:29 -0700755
756 /* Display : 1024x600 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800757 {CRTM1024x600, ARRAY_SIZE(CRTM1024x600)},
Joseph Chan9f291632008-10-15 22:03:29 -0700758
759 /* Display : 1024x768 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800760 {CRTM1024x768, ARRAY_SIZE(CRTM1024x768)},
Joseph Chan9f291632008-10-15 22:03:29 -0700761
762 /* Display : 1152x864 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800763 {CRTM1152x864, ARRAY_SIZE(CRTM1152x864)},
Joseph Chan9f291632008-10-15 22:03:29 -0700764
765 /* Display : 1280x768 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800766 {CRTM1280x768, ARRAY_SIZE(CRTM1280x768)},
Joseph Chan9f291632008-10-15 22:03:29 -0700767
768 /* Display : 960x600 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800769 {CRTM960x600, ARRAY_SIZE(CRTM960x600)},
Joseph Chan9f291632008-10-15 22:03:29 -0700770
771 /* Display : 1000x600 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800772 {CRTM1000x600, ARRAY_SIZE(CRTM1000x600)},
Joseph Chan9f291632008-10-15 22:03:29 -0700773
774 /* Display : 1024x576 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800775 {CRTM1024x576, ARRAY_SIZE(CRTM1024x576)},
Joseph Chan9f291632008-10-15 22:03:29 -0700776
777 /* Display : 1088x612 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800778 {CRTM1088x612, ARRAY_SIZE(CRTM1088x612)},
Joseph Chan9f291632008-10-15 22:03:29 -0700779
780 /* Display : 1152x720 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800781 {CRTM1152x720, ARRAY_SIZE(CRTM1152x720)},
Joseph Chan9f291632008-10-15 22:03:29 -0700782
783 /* Display : 1200x720 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800784 {CRTM1200x720, ARRAY_SIZE(CRTM1200x720)},
Joseph Chan9f291632008-10-15 22:03:29 -0700785
Chris Ballc205d932009-06-07 13:59:51 -0400786 /* Display : 1200x900 (DCON) */
787 {DCON1200x900, ARRAY_SIZE(DCON1200x900)},
788
Joseph Chan9f291632008-10-15 22:03:29 -0700789 /* Display : 1280x600 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800790 {CRTM1280x600, ARRAY_SIZE(CRTM1280x600)},
Joseph Chan9f291632008-10-15 22:03:29 -0700791
792 /* Display : 1280x800 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800793 {CRTM1280x800, ARRAY_SIZE(CRTM1280x800)},
Joseph Chan9f291632008-10-15 22:03:29 -0700794
795 /* Display : 1280x960 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800796 {CRTM1280x960, ARRAY_SIZE(CRTM1280x960)},
Joseph Chan9f291632008-10-15 22:03:29 -0700797
798 /* Display : 1280x1024 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800799 {CRTM1280x1024, ARRAY_SIZE(CRTM1280x1024)},
Joseph Chan9f291632008-10-15 22:03:29 -0700800
801 /* Display : 1360x768 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800802 {CRTM1360x768, ARRAY_SIZE(CRTM1360x768)},
Joseph Chan9f291632008-10-15 22:03:29 -0700803
804 /* Display : 1366x768 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800805 {CRTM1366x768, ARRAY_SIZE(CRTM1366x768)},
Joseph Chan9f291632008-10-15 22:03:29 -0700806
807 /* Display : 1368x768 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800808 {CRTM1368x768, ARRAY_SIZE(CRTM1368x768)},
Joseph Chan9f291632008-10-15 22:03:29 -0700809
810 /* Display : 1440x900 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800811 {CRTM1440x900, ARRAY_SIZE(CRTM1440x900)},
Joseph Chan9f291632008-10-15 22:03:29 -0700812
813 /* Display : 1440x1050 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800814 {CRTM1440x1050, ARRAY_SIZE(CRTM1440x1050)},
Joseph Chan9f291632008-10-15 22:03:29 -0700815
816 /* Display : 1600x900 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800817 {CRTM1600x900, ARRAY_SIZE(CRTM1600x900)},
Joseph Chan9f291632008-10-15 22:03:29 -0700818
819 /* Display : 1600x1024 (GTF) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800820 {CRTM1600x1024, ARRAY_SIZE(CRTM1600x1024)},
Joseph Chan9f291632008-10-15 22:03:29 -0700821
822 /* Display : 1600x1200 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800823 {CRTM1600x1200, ARRAY_SIZE(CRTM1600x1200)},
Joseph Chan9f291632008-10-15 22:03:29 -0700824
825 /* Display : 1680x1050 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800826 {CRTM1680x1050, ARRAY_SIZE(CRTM1680x1050)},
Joseph Chan9f291632008-10-15 22:03:29 -0700827
828 /* Display : 1792x1344 (DMT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800829 {CRTM1792x1344, ARRAY_SIZE(CRTM1792x1344)},
Joseph Chan9f291632008-10-15 22:03:29 -0700830
831 /* Display : 1856x1392 (DMT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800832 {CRTM1856x1392, ARRAY_SIZE(CRTM1856x1392)},
Joseph Chan9f291632008-10-15 22:03:29 -0700833
834 /* Display : 1920x1440 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800835 {CRTM1920x1440, ARRAY_SIZE(CRTM1920x1440)},
Joseph Chan9f291632008-10-15 22:03:29 -0700836
837 /* Display : 2048x1536 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800838 {CRTM2048x1536, ARRAY_SIZE(CRTM2048x1536)},
Joseph Chan9f291632008-10-15 22:03:29 -0700839
840 /* Display : 1280x720 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800841 {CRTM1280x720, ARRAY_SIZE(CRTM1280x720)},
Joseph Chan9f291632008-10-15 22:03:29 -0700842
843 /* Display : 1920x1080 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800844 {CRTM1920x1080, ARRAY_SIZE(CRTM1920x1080)},
Joseph Chan9f291632008-10-15 22:03:29 -0700845
846 /* Display : 1920x1200 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800847 {CRTM1920x1200, ARRAY_SIZE(CRTM1920x1200)},
Joseph Chan9f291632008-10-15 22:03:29 -0700848
849 /* Display : 1400x1050 (CVT) */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800850 {CRTM1400x1050, ARRAY_SIZE(CRTM1400x1050)}
Joseph Chan9f291632008-10-15 22:03:29 -0700851};
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800852
Stephen Hemminger23e5abd2011-03-03 10:00:08 -0800853static struct VideoModeTable viafb_rb_modes[] = {
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800854 /* Display : 1360x768 (CVT Reduce Blanking) */
855 {CRTM1360x768_RB, ARRAY_SIZE(CRTM1360x768_RB)},
856
857 /* Display : 1440x900 (CVT Reduce Blanking) */
858 {CRTM1440x900_RB, ARRAY_SIZE(CRTM1440x900_RB)},
859
860 /* Display : 1400x1050 (CVT Reduce Blanking) */
861 {CRTM1400x1050_RB, ARRAY_SIZE(CRTM1400x1050_RB)},
862
863 /* Display : 1600x900 (CVT Reduce Blanking) */
864 {CRTM1600x900_RB, ARRAY_SIZE(CRTM1600x900_RB)},
865
866 /* Display : 1680x1050 (CVT Reduce Blanking) */
867 {CRTM1680x1050_RB, ARRAY_SIZE(CRTM1680x1050_RB)},
868
869 /* Display : 1920x1080 (CVT Reduce Blanking) */
870 {CRTM1920x1080_RB, ARRAY_SIZE(CRTM1920x1080_RB)},
871
872 /* Display : 1920x1200 (CVT Reduce Blanking) */
873 {CRTM1920x1200_RB, ARRAY_SIZE(CRTM1920x1200_RB)}
874};
875
Joseph Chan9f291632008-10-15 22:03:29 -0700876struct crt_mode_table CEAM1280x720[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000877 {REFRESH_60, M1280X720_CEA_R60_HSP, M1280X720_CEA_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700878 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
879 {1650, 1280, 1280, 370, 1390, 40, 750, 720, 720, 30, 725, 5} }
880};
881struct crt_mode_table CEAM1920x1080[] = {
Florian Tobias Schandinatfd3cc692011-03-11 00:04:01 +0000882 {REFRESH_60, M1920X1080_CEA_R60_HSP, M1920X1080_CEA_R60_VSP,
Joseph Chan9f291632008-10-15 22:03:29 -0700883 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
884 {2200, 1920, 1920, 300, 2008, 44, 1125, 1080, 1080, 45, 1084, 5} }
885};
886struct VideoModeTable CEA_HDMI_Modes[] = {
887 /* Display : 1280x720 */
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800888 {CEAM1280x720, ARRAY_SIZE(CEAM1280x720)},
889 {CEAM1920x1080, ARRAY_SIZE(CEAM1920x1080)}
Joseph Chan9f291632008-10-15 22:03:29 -0700890};
Florian Tobias Schandinatdeb7aab2009-09-22 16:47:16 -0700891
Florian Tobias Schandinatdeb7aab2009-09-22 16:47:16 -0700892int NUM_TOTAL_CEA_MODES = ARRAY_SIZE(CEA_HDMI_Modes);
893int NUM_TOTAL_CN400_ModeXregs = ARRAY_SIZE(CN400_ModeXregs);
894int NUM_TOTAL_CN700_ModeXregs = ARRAY_SIZE(CN700_ModeXregs);
895int NUM_TOTAL_KM400_ModeXregs = ARRAY_SIZE(KM400_ModeXregs);
896int NUM_TOTAL_CX700_ModeXregs = ARRAY_SIZE(CX700_ModeXregs);
Harald Welte0306ab12009-09-22 16:47:35 -0700897int NUM_TOTAL_VX855_ModeXregs = ARRAY_SIZE(VX855_ModeXregs);
Florian Tobias Schandinatdeb7aab2009-09-22 16:47:16 -0700898int NUM_TOTAL_CLE266_ModeXregs = ARRAY_SIZE(CLE266_ModeXregs);
899int NUM_TOTAL_PATCH_MODE = ARRAY_SIZE(res_patch_table);
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -0800900
901
902struct VideoModeTable *viafb_get_mode(int hres, int vres)
903{
904 u32 i;
905 for (i = 0; i < ARRAY_SIZE(viafb_modes); i++)
906 if (viafb_modes[i].mode_array &&
907 viafb_modes[i].crtc[0].crtc.hor_addr == hres &&
908 viafb_modes[i].crtc[0].crtc.ver_addr == vres)
909 return &viafb_modes[i];
910
911 return NULL;
912}
913
914struct VideoModeTable *viafb_get_rb_mode(int hres, int vres)
915{
916 u32 i;
917 for (i = 0; i < ARRAY_SIZE(viafb_rb_modes); i++)
918 if (viafb_rb_modes[i].mode_array &&
919 viafb_rb_modes[i].crtc[0].crtc.hor_addr == hres &&
920 viafb_rb_modes[i].crtc[0].crtc.ver_addr == vres)
921 return &viafb_rb_modes[i];
922
923 return NULL;
924}