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 | |
Jonathan Corbet | ec66841 | 2010-05-05 14:44:55 -0600 | [diff] [blame] | 22 | #include <linux/via-core.h> |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 23 | #include "global.h" |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 24 | |
| 25 | struct 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 Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 39 | {VIACR, CR35, 0xFF, 0x00}, |
| 40 | {VIACR, CR36, 0x08, 0x00}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 41 | {VIACR, CR69, 0xFF, 0x00}, |
| 42 | {VIACR, CR6A, 0xFF, 0x40}, |
| 43 | {VIACR, CR6B, 0xFF, 0x00}, |
| 44 | {VIACR, CR6C, 0xFF, 0x00}, |
| 45 | {VIACR, CR7A, 0xFF, 0x01}, /* LCD Scaling Parameter 1 */ |
| 46 | {VIACR, CR7B, 0xFF, 0x02}, /* LCD Scaling Parameter 2 */ |
| 47 | {VIACR, CR7C, 0xFF, 0x03}, /* LCD Scaling Parameter 3 */ |
| 48 | {VIACR, CR7D, 0xFF, 0x04}, /* LCD Scaling Parameter 4 */ |
| 49 | {VIACR, CR7E, 0xFF, 0x07}, /* LCD Scaling Parameter 5 */ |
| 50 | {VIACR, CR7F, 0xFF, 0x0A}, /* LCD Scaling Parameter 6 */ |
| 51 | {VIACR, CR80, 0xFF, 0x0D}, /* LCD Scaling Parameter 7 */ |
| 52 | {VIACR, CR81, 0xFF, 0x13}, /* LCD Scaling Parameter 8 */ |
| 53 | {VIACR, CR82, 0xFF, 0x16}, /* LCD Scaling Parameter 9 */ |
| 54 | {VIACR, CR83, 0xFF, 0x19}, /* LCD Scaling Parameter 10 */ |
| 55 | {VIACR, CR84, 0xFF, 0x1C}, /* LCD Scaling Parameter 11 */ |
| 56 | {VIACR, CR85, 0xFF, 0x1D}, /* LCD Scaling Parameter 12 */ |
| 57 | {VIACR, CR86, 0xFF, 0x1E}, /* LCD Scaling Parameter 13 */ |
| 58 | {VIACR, CR87, 0xFF, 0x1F}, /* LCD Scaling Parameter 14 */ |
| 59 | {VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */ |
| 60 | {VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */ |
| 61 | {VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */ |
| 62 | {VIACR, CR8B, 0xFF, 0x69}, /* LCD Power Sequence Control 0 */ |
| 63 | {VIACR, CR8C, 0xFF, 0x57}, /* LCD Power Sequence Control 1 */ |
| 64 | {VIACR, CR8D, 0xFF, 0x00}, /* LCD Power Sequence Control 2 */ |
| 65 | {VIACR, CR8E, 0xFF, 0x7B}, /* LCD Power Sequence Control 3 */ |
| 66 | {VIACR, CR8F, 0xFF, 0x03}, /* LCD Power Sequence Control 4 */ |
| 67 | {VIACR, CR90, 0xFF, 0x30}, /* LCD Power Sequence Control 5 */ |
| 68 | {VIACR, CR91, 0xFF, 0xA0}, /* 24/12 bit LVDS Data off */ |
| 69 | {VIACR, CR96, 0xFF, 0x00}, |
| 70 | {VIACR, CR97, 0xFF, 0x00}, |
| 71 | {VIACR, CR99, 0xFF, 0x00}, |
| 72 | {VIACR, CR9B, 0xFF, 0x00} |
| 73 | }; |
| 74 | |
| 75 | /* Video Mode Table for VT3314 chipset*/ |
| 76 | /* Common Setting for Video Mode */ |
| 77 | struct io_reg CN700_ModeXregs[] = { {VIASR, SR10, 0xFF, 0x01}, |
| 78 | {VIASR, SR15, 0x02, 0x02}, |
| 79 | {VIASR, SR16, 0xBF, 0x08}, |
| 80 | {VIASR, SR17, 0xFF, 0x1F}, |
| 81 | {VIASR, SR18, 0xFF, 0x4E}, |
| 82 | {VIASR, SR1A, 0xFB, 0x82}, |
| 83 | {VIASR, SR1B, 0xFF, 0xF0}, |
| 84 | {VIASR, SR1F, 0xFF, 0x00}, |
| 85 | {VIASR, SR1E, 0xFF, 0x01}, |
| 86 | {VIASR, SR22, 0xFF, 0x1F}, |
| 87 | {VIASR, SR2A, 0x0F, 0x00}, |
| 88 | {VIASR, SR2E, 0xFF, 0xFF}, |
| 89 | {VIASR, SR3F, 0xFF, 0xFF}, |
| 90 | {VIASR, SR40, 0xF7, 0x00}, |
| 91 | {VIASR, CR30, 0xFF, 0x04}, |
| 92 | {VIACR, CR32, 0xFF, 0x00}, |
| 93 | {VIACR, CR33, 0x7F, 0x00}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 94 | {VIACR, CR35, 0xFF, 0x00}, |
| 95 | {VIACR, CR36, 0xFF, 0x31}, |
| 96 | {VIACR, CR41, 0xFF, 0x80}, |
| 97 | {VIACR, CR42, 0xFF, 0x00}, |
| 98 | {VIACR, CR55, 0x80, 0x00}, |
| 99 | {VIACR, CR5D, 0x80, 0x00}, /*Horizontal Retrace Start bit[11] should be 0*/ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 100 | {VIACR, CR68, 0xFF, 0x67}, /* Default FIFO For IGA2 */ |
| 101 | {VIACR, CR69, 0xFF, 0x00}, |
| 102 | {VIACR, CR6A, 0xFD, 0x40}, |
| 103 | {VIACR, CR6B, 0xFF, 0x00}, |
| 104 | {VIACR, CR6C, 0xFF, 0x00}, |
| 105 | {VIACR, CR77, 0xFF, 0x00}, /* LCD scaling Factor */ |
| 106 | {VIACR, CR78, 0xFF, 0x00}, /* LCD scaling Factor */ |
| 107 | {VIACR, CR79, 0xFF, 0x00}, /* LCD scaling Factor */ |
| 108 | {VIACR, CR9F, 0x03, 0x00}, /* LCD scaling Factor */ |
| 109 | {VIACR, CR7A, 0xFF, 0x01}, /* LCD Scaling Parameter 1 */ |
| 110 | {VIACR, CR7B, 0xFF, 0x02}, /* LCD Scaling Parameter 2 */ |
| 111 | {VIACR, CR7C, 0xFF, 0x03}, /* LCD Scaling Parameter 3 */ |
| 112 | {VIACR, CR7D, 0xFF, 0x04}, /* LCD Scaling Parameter 4 */ |
| 113 | {VIACR, CR7E, 0xFF, 0x07}, /* LCD Scaling Parameter 5 */ |
| 114 | {VIACR, CR7F, 0xFF, 0x0A}, /* LCD Scaling Parameter 6 */ |
| 115 | {VIACR, CR80, 0xFF, 0x0D}, /* LCD Scaling Parameter 7 */ |
| 116 | {VIACR, CR81, 0xFF, 0x13}, /* LCD Scaling Parameter 8 */ |
| 117 | {VIACR, CR82, 0xFF, 0x16}, /* LCD Scaling Parameter 9 */ |
| 118 | {VIACR, CR83, 0xFF, 0x19}, /* LCD Scaling Parameter 10 */ |
| 119 | {VIACR, CR84, 0xFF, 0x1C}, /* LCD Scaling Parameter 11 */ |
| 120 | {VIACR, CR85, 0xFF, 0x1D}, /* LCD Scaling Parameter 12 */ |
| 121 | {VIACR, CR86, 0xFF, 0x1E}, /* LCD Scaling Parameter 13 */ |
| 122 | {VIACR, CR87, 0xFF, 0x1F}, /* LCD Scaling Parameter 14 */ |
| 123 | {VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */ |
| 124 | {VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */ |
| 125 | {VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */ |
| 126 | {VIACR, CR8B, 0xFF, 0x5D}, /* LCD Power Sequence Control 0 */ |
| 127 | {VIACR, CR8C, 0xFF, 0x2B}, /* LCD Power Sequence Control 1 */ |
| 128 | {VIACR, CR8D, 0xFF, 0x6F}, /* LCD Power Sequence Control 2 */ |
| 129 | {VIACR, CR8E, 0xFF, 0x2B}, /* LCD Power Sequence Control 3 */ |
| 130 | {VIACR, CR8F, 0xFF, 0x01}, /* LCD Power Sequence Control 4 */ |
| 131 | {VIACR, CR90, 0xFF, 0x01}, /* LCD Power Sequence Control 5 */ |
| 132 | {VIACR, CR91, 0xFF, 0xA0}, /* 24/12 bit LVDS Data off */ |
| 133 | {VIACR, CR96, 0xFF, 0x00}, |
| 134 | {VIACR, CR97, 0xFF, 0x00}, |
| 135 | {VIACR, CR99, 0xFF, 0x00}, |
| 136 | {VIACR, CR9B, 0xFF, 0x00}, |
| 137 | {VIACR, CR9D, 0xFF, 0x80}, |
| 138 | {VIACR, CR9E, 0xFF, 0x80} |
| 139 | }; |
| 140 | |
| 141 | struct io_reg KM400_ModeXregs[] = { |
| 142 | {VIASR, SR10, 0xFF, 0x01}, /* Unlock Register */ |
| 143 | {VIASR, SR16, 0xFF, 0x08}, /* Display FIFO threshold Control */ |
| 144 | {VIASR, SR17, 0xFF, 0x1F}, /* Display FIFO Control */ |
| 145 | {VIASR, SR18, 0xFF, 0x4E}, /* GFX PREQ threshold */ |
| 146 | {VIASR, SR1A, 0xFF, 0x0a}, /* GFX PREQ threshold */ |
| 147 | {VIASR, SR1F, 0xFF, 0x00}, /* Memory Control 0 */ |
| 148 | {VIASR, SR1B, 0xFF, 0xF0}, /* Power Management Control 0 */ |
| 149 | {VIASR, SR1E, 0xFF, 0x01}, /* Power Management Control */ |
| 150 | {VIASR, SR20, 0xFF, 0x00}, /* Sequencer Arbiter Control 0 */ |
| 151 | {VIASR, SR21, 0xFF, 0x00}, /* Sequencer Arbiter Control 1 */ |
| 152 | {VIASR, SR22, 0xFF, 0x1F}, /* Display Arbiter Control 1 */ |
| 153 | {VIASR, SR2A, 0xFF, 0x00}, /* Power Management Control 5 */ |
| 154 | {VIASR, SR2D, 0xFF, 0xFF}, /* Power Management Control 1 */ |
| 155 | {VIASR, SR2E, 0xFF, 0xFF}, /* Power Management Control 2 */ |
| 156 | {VIACR, CR0A, 0xFF, 0x1E}, /* Cursor Start */ |
| 157 | {VIACR, CR0B, 0xFF, 0x00}, /* Cursor End */ |
| 158 | {VIACR, CR0E, 0xFF, 0x00}, /* Cursor Location High */ |
| 159 | {VIACR, CR0F, 0xFF, 0x00}, /* Cursor Localtion Low */ |
| 160 | {VIACR, CR33, 0xFF, 0x00}, |
| 161 | {VIACR, CR55, 0x80, 0x00}, |
| 162 | {VIACR, CR5D, 0x80, 0x00}, |
| 163 | {VIACR, CR36, 0xFF, 0x01}, /* Power Mangement 3 */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 164 | {VIACR, CR68, 0xFF, 0x67}, /* Default FIFO For IGA2 */ |
| 165 | {VIACR, CR6A, 0x20, 0x20}, /* Extended FIFO On */ |
| 166 | {VIACR, CR7A, 0xFF, 0x01}, /* LCD Scaling Parameter 1 */ |
| 167 | {VIACR, CR7B, 0xFF, 0x02}, /* LCD Scaling Parameter 2 */ |
| 168 | {VIACR, CR7C, 0xFF, 0x03}, /* LCD Scaling Parameter 3 */ |
| 169 | {VIACR, CR7D, 0xFF, 0x04}, /* LCD Scaling Parameter 4 */ |
| 170 | {VIACR, CR7E, 0xFF, 0x07}, /* LCD Scaling Parameter 5 */ |
| 171 | {VIACR, CR7F, 0xFF, 0x0A}, /* LCD Scaling Parameter 6 */ |
| 172 | {VIACR, CR80, 0xFF, 0x0D}, /* LCD Scaling Parameter 7 */ |
| 173 | {VIACR, CR81, 0xFF, 0x13}, /* LCD Scaling Parameter 8 */ |
| 174 | {VIACR, CR82, 0xFF, 0x16}, /* LCD Scaling Parameter 9 */ |
| 175 | {VIACR, CR83, 0xFF, 0x19}, /* LCD Scaling Parameter 10 */ |
| 176 | {VIACR, CR84, 0xFF, 0x1C}, /* LCD Scaling Parameter 11 */ |
| 177 | {VIACR, CR85, 0xFF, 0x1D}, /* LCD Scaling Parameter 12 */ |
| 178 | {VIACR, CR86, 0xFF, 0x1E}, /* LCD Scaling Parameter 13 */ |
| 179 | {VIACR, CR87, 0xFF, 0x1F}, /* LCD Scaling Parameter 14 */ |
| 180 | {VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */ |
| 181 | {VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */ |
| 182 | {VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */ |
| 183 | {VIACR, CR8B, 0xFF, 0x2D}, /* LCD Power Sequence Control 0 */ |
| 184 | {VIACR, CR8C, 0xFF, 0x2D}, /* LCD Power Sequence Control 1 */ |
| 185 | {VIACR, CR8D, 0xFF, 0xC8}, /* LCD Power Sequence Control 2 */ |
| 186 | {VIACR, CR8E, 0xFF, 0x36}, /* LCD Power Sequence Control 3 */ |
| 187 | {VIACR, CR8F, 0xFF, 0x00}, /* LCD Power Sequence Control 4 */ |
| 188 | {VIACR, CR90, 0xFF, 0x10}, /* LCD Power Sequence Control 5 */ |
| 189 | {VIACR, CR91, 0xFF, 0xA0}, /* 24/12 bit LVDS Data off */ |
| 190 | {VIACR, CR96, 0xFF, 0x03}, /* DVP0 ; DVP0 Clock Skew */ |
| 191 | {VIACR, CR97, 0xFF, 0x03}, /* DFP high ; DFPH Clock Skew */ |
| 192 | {VIACR, CR99, 0xFF, 0x03}, /* DFP low ; DFPL Clock Skew*/ |
| 193 | {VIACR, CR9B, 0xFF, 0x07} /* DVI on DVP1 ; DVP1 Clock Skew*/ |
| 194 | }; |
| 195 | |
| 196 | /* For VT3324: Common Setting for Video Mode */ |
| 197 | struct io_reg CX700_ModeXregs[] = { {VIASR, SR10, 0xFF, 0x01}, |
| 198 | {VIASR, SR15, 0x02, 0x02}, |
| 199 | {VIASR, SR16, 0xBF, 0x08}, |
| 200 | {VIASR, SR17, 0xFF, 0x1F}, |
| 201 | {VIASR, SR18, 0xFF, 0x4E}, |
| 202 | {VIASR, SR1A, 0xFB, 0x08}, |
| 203 | {VIASR, SR1B, 0xFF, 0xF0}, |
| 204 | {VIASR, SR1E, 0xFF, 0x01}, |
| 205 | {VIASR, SR2A, 0xFF, 0x00}, |
| 206 | {VIASR, SR2D, 0xFF, 0xFF}, /* VCK and LCK PLL power on. */ |
| 207 | {VIACR, CR0A, 0xFF, 0x1E}, /* Cursor Start */ |
| 208 | {VIACR, CR0B, 0xFF, 0x00}, /* Cursor End */ |
| 209 | {VIACR, CR0E, 0xFF, 0x00}, /* Cursor Location High */ |
| 210 | {VIACR, CR0F, 0xFF, 0x00}, /* Cursor Localtion Low */ |
| 211 | {VIACR, CR32, 0xFF, 0x00}, |
| 212 | {VIACR, CR33, 0xFF, 0x00}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 213 | {VIACR, CR35, 0xFF, 0x00}, |
| 214 | {VIACR, CR36, 0x08, 0x00}, |
| 215 | {VIACR, CR47, 0xC8, 0x00}, /* Clear VCK Plus. */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 216 | {VIACR, CR69, 0xFF, 0x00}, |
| 217 | {VIACR, CR6A, 0xFF, 0x40}, |
| 218 | {VIACR, CR6B, 0xFF, 0x00}, |
| 219 | {VIACR, CR6C, 0xFF, 0x00}, |
| 220 | {VIACR, CR7A, 0xFF, 0x01}, /* LCD Scaling Parameter 1 */ |
| 221 | {VIACR, CR7B, 0xFF, 0x02}, /* LCD Scaling Parameter 2 */ |
| 222 | {VIACR, CR7C, 0xFF, 0x03}, /* LCD Scaling Parameter 3 */ |
| 223 | {VIACR, CR7D, 0xFF, 0x04}, /* LCD Scaling Parameter 4 */ |
| 224 | {VIACR, CR7E, 0xFF, 0x07}, /* LCD Scaling Parameter 5 */ |
| 225 | {VIACR, CR7F, 0xFF, 0x0A}, /* LCD Scaling Parameter 6 */ |
| 226 | {VIACR, CR80, 0xFF, 0x0D}, /* LCD Scaling Parameter 7 */ |
| 227 | {VIACR, CR81, 0xFF, 0x13}, /* LCD Scaling Parameter 8 */ |
| 228 | {VIACR, CR82, 0xFF, 0x16}, /* LCD Scaling Parameter 9 */ |
| 229 | {VIACR, CR83, 0xFF, 0x19}, /* LCD Scaling Parameter 10 */ |
| 230 | {VIACR, CR84, 0xFF, 0x1C}, /* LCD Scaling Parameter 11 */ |
| 231 | {VIACR, CR85, 0xFF, 0x1D}, /* LCD Scaling Parameter 12 */ |
| 232 | {VIACR, CR86, 0xFF, 0x1E}, /* LCD Scaling Parameter 13 */ |
| 233 | {VIACR, CR87, 0xFF, 0x1F}, /* LCD Scaling Parameter 14 */ |
| 234 | {VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */ |
| 235 | {VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */ |
| 236 | {VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */ |
| 237 | {VIACR, CRD4, 0xFF, 0x81}, /* Second power sequence control */ |
| 238 | {VIACR, CR8B, 0xFF, 0x5D}, /* LCD Power Sequence Control 0 */ |
| 239 | {VIACR, CR8C, 0xFF, 0x2B}, /* LCD Power Sequence Control 1 */ |
| 240 | {VIACR, CR8D, 0xFF, 0x6F}, /* LCD Power Sequence Control 2 */ |
| 241 | {VIACR, CR8E, 0xFF, 0x2B}, /* LCD Power Sequence Control 3 */ |
| 242 | {VIACR, CR8F, 0xFF, 0x01}, /* LCD Power Sequence Control 4 */ |
| 243 | {VIACR, CR90, 0xFF, 0x01}, /* LCD Power Sequence Control 5 */ |
| 244 | {VIACR, CR91, 0xFF, 0x80}, /* 24/12 bit LVDS Data off */ |
| 245 | {VIACR, CR96, 0xFF, 0x00}, |
| 246 | {VIACR, CR97, 0xFF, 0x00}, |
| 247 | {VIACR, CR99, 0xFF, 0x00}, |
Florian Tobias Schandinat | 8594ac3 | 2009-09-22 16:47:22 -0700 | [diff] [blame] | 248 | {VIACR, CR9B, 0xFF, 0x00} |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 249 | }; |
| 250 | |
Harald Welte | 0306ab1 | 2009-09-22 16:47:35 -0700 | [diff] [blame] | 251 | struct io_reg VX855_ModeXregs[] = { |
| 252 | {VIASR, SR10, 0xFF, 0x01}, |
| 253 | {VIASR, SR15, 0x02, 0x02}, |
| 254 | {VIASR, SR16, 0xBF, 0x08}, |
| 255 | {VIASR, SR17, 0xFF, 0x1F}, |
| 256 | {VIASR, SR18, 0xFF, 0x4E}, |
| 257 | {VIASR, SR1A, 0xFB, 0x08}, |
| 258 | {VIASR, SR1B, 0xFF, 0xF0}, |
| 259 | {VIASR, SR1E, 0x07, 0x01}, |
| 260 | {VIASR, SR2A, 0xF0, 0x00}, |
| 261 | {VIASR, SR58, 0xFF, 0x00}, |
| 262 | {VIASR, SR59, 0xFF, 0x00}, |
| 263 | {VIASR, SR2D, 0xFF, 0xFF}, /* VCK and LCK PLL power on. */ |
| 264 | {VIACR, CR09, 0xFF, 0x00}, /* Initial CR09=0*/ |
| 265 | {VIACR, CR11, 0x8F, 0x00}, /* IGA1 initial Vertical end */ |
| 266 | {VIACR, CR17, 0x7F, 0x00}, /* IGA1 CRT Mode control init */ |
| 267 | {VIACR, CR0A, 0xFF, 0x1E}, /* Cursor Start */ |
| 268 | {VIACR, CR0B, 0xFF, 0x00}, /* Cursor End */ |
| 269 | {VIACR, CR0E, 0xFF, 0x00}, /* Cursor Location High */ |
| 270 | {VIACR, CR0F, 0xFF, 0x00}, /* Cursor Localtion Low */ |
| 271 | {VIACR, CR32, 0xFF, 0x00}, |
| 272 | {VIACR, CR33, 0x7F, 0x00}, |
| 273 | {VIACR, CR35, 0xFF, 0x00}, |
| 274 | {VIACR, CR36, 0x08, 0x00}, |
| 275 | {VIACR, CR69, 0xFF, 0x00}, |
| 276 | {VIACR, CR6A, 0xFD, 0x60}, |
| 277 | {VIACR, CR6B, 0xFF, 0x00}, |
| 278 | {VIACR, CR6C, 0xFF, 0x00}, |
| 279 | {VIACR, CR7A, 0xFF, 0x01}, /* LCD Scaling Parameter 1 */ |
| 280 | {VIACR, CR7B, 0xFF, 0x02}, /* LCD Scaling Parameter 2 */ |
| 281 | {VIACR, CR7C, 0xFF, 0x03}, /* LCD Scaling Parameter 3 */ |
| 282 | {VIACR, CR7D, 0xFF, 0x04}, /* LCD Scaling Parameter 4 */ |
| 283 | {VIACR, CR7E, 0xFF, 0x07}, /* LCD Scaling Parameter 5 */ |
| 284 | {VIACR, CR7F, 0xFF, 0x0A}, /* LCD Scaling Parameter 6 */ |
| 285 | {VIACR, CR80, 0xFF, 0x0D}, /* LCD Scaling Parameter 7 */ |
| 286 | {VIACR, CR81, 0xFF, 0x13}, /* LCD Scaling Parameter 8 */ |
| 287 | {VIACR, CR82, 0xFF, 0x16}, /* LCD Scaling Parameter 9 */ |
| 288 | {VIACR, CR83, 0xFF, 0x19}, /* LCD Scaling Parameter 10 */ |
| 289 | {VIACR, CR84, 0xFF, 0x1C}, /* LCD Scaling Parameter 11 */ |
| 290 | {VIACR, CR85, 0xFF, 0x1D}, /* LCD Scaling Parameter 12 */ |
| 291 | {VIACR, CR86, 0xFF, 0x1E}, /* LCD Scaling Parameter 13 */ |
| 292 | {VIACR, CR87, 0xFF, 0x1F}, /* LCD Scaling Parameter 14 */ |
| 293 | {VIACR, CR88, 0xFF, 0x40}, /* LCD Panel Type */ |
| 294 | {VIACR, CR89, 0xFF, 0x00}, /* LCD Timing Control 0 */ |
| 295 | {VIACR, CR8A, 0xFF, 0x88}, /* LCD Timing Control 1 */ |
| 296 | {VIACR, CRD4, 0xFF, 0x81}, /* Second power sequence control */ |
| 297 | {VIACR, CR91, 0xFF, 0x80}, /* 24/12 bit LVDS Data off */ |
| 298 | {VIACR, CR96, 0xFF, 0x00}, |
| 299 | {VIACR, CR97, 0xFF, 0x00}, |
| 300 | {VIACR, CR99, 0xFF, 0x00}, |
| 301 | {VIACR, CR9B, 0xFF, 0x00}, |
| 302 | {VIACR, CRD2, 0xFF, 0xFF} /* TMDS/LVDS control register. */ |
| 303 | }; |
| 304 | |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 305 | /* Video Mode Table */ |
| 306 | /* Common Setting for Video Mode */ |
| 307 | struct io_reg CLE266_ModeXregs[] = { {VIASR, SR1E, 0xF0, 0x00}, |
| 308 | {VIASR, SR2A, 0x0F, 0x00}, |
| 309 | {VIASR, SR15, 0x02, 0x02}, |
| 310 | {VIASR, SR16, 0xBF, 0x08}, |
| 311 | {VIASR, SR17, 0xFF, 0x1F}, |
| 312 | {VIASR, SR18, 0xFF, 0x4E}, |
| 313 | {VIASR, SR1A, 0xFB, 0x08}, |
| 314 | |
| 315 | {VIACR, CR32, 0xFF, 0x00}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 316 | {VIACR, CR35, 0xFF, 0x00}, |
| 317 | {VIACR, CR36, 0x08, 0x00}, |
| 318 | {VIACR, CR6A, 0xFF, 0x80}, |
| 319 | {VIACR, CR6A, 0xFF, 0xC0}, |
| 320 | |
| 321 | {VIACR, CR55, 0x80, 0x00}, |
| 322 | {VIACR, CR5D, 0x80, 0x00}, |
| 323 | |
| 324 | {VIAGR, GR20, 0xFF, 0x00}, |
| 325 | {VIAGR, GR21, 0xFF, 0x00}, |
| 326 | {VIAGR, GR22, 0xFF, 0x00}, |
| 327 | /* LCD Parameters */ |
| 328 | {VIACR, CR7A, 0xFF, 0x01}, /* LCD Parameter 1 */ |
| 329 | {VIACR, CR7B, 0xFF, 0x02}, /* LCD Parameter 2 */ |
| 330 | {VIACR, CR7C, 0xFF, 0x03}, /* LCD Parameter 3 */ |
| 331 | {VIACR, CR7D, 0xFF, 0x04}, /* LCD Parameter 4 */ |
| 332 | {VIACR, CR7E, 0xFF, 0x07}, /* LCD Parameter 5 */ |
| 333 | {VIACR, CR7F, 0xFF, 0x0A}, /* LCD Parameter 6 */ |
| 334 | {VIACR, CR80, 0xFF, 0x0D}, /* LCD Parameter 7 */ |
| 335 | {VIACR, CR81, 0xFF, 0x13}, /* LCD Parameter 8 */ |
| 336 | {VIACR, CR82, 0xFF, 0x16}, /* LCD Parameter 9 */ |
| 337 | {VIACR, CR83, 0xFF, 0x19}, /* LCD Parameter 10 */ |
| 338 | {VIACR, CR84, 0xFF, 0x1C}, /* LCD Parameter 11 */ |
| 339 | {VIACR, CR85, 0xFF, 0x1D}, /* LCD Parameter 12 */ |
| 340 | {VIACR, CR86, 0xFF, 0x1E}, /* LCD Parameter 13 */ |
| 341 | {VIACR, CR87, 0xFF, 0x1F}, /* LCD Parameter 14 */ |
| 342 | |
| 343 | }; |
| 344 | |
| 345 | /* Mode:1024X768 */ |
| 346 | struct io_reg PM1024x768[] = { {VIASR, 0x16, 0xBF, 0x0C}, |
| 347 | {VIASR, 0x18, 0xFF, 0x4C} |
| 348 | }; |
| 349 | |
| 350 | struct patch_table res_patch_table[] = { |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 351 | {ARRAY_SIZE(PM1024x768), PM1024x768} |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 352 | }; |
| 353 | |
| 354 | /* struct VPITTable { |
| 355 | unsigned char Misc; |
| 356 | unsigned char SR[StdSR]; |
| 357 | unsigned char CR[StdCR]; |
| 358 | unsigned char GR[StdGR]; |
| 359 | unsigned char AR[StdAR]; |
| 360 | };*/ |
| 361 | |
| 362 | struct VPITTable VPIT = { |
| 363 | /* Msic */ |
| 364 | 0xC7, |
| 365 | /* Sequencer */ |
| 366 | {0x01, 0x0F, 0x00, 0x0E}, |
| 367 | /* Graphic Controller */ |
| 368 | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0F, 0xFF}, |
| 369 | /* Attribute Controller */ |
| 370 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 371 | 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, |
| 372 | 0x01, 0x00, 0x0F, 0x00} |
| 373 | }; |
| 374 | |
| 375 | /********************/ |
| 376 | /* Mode Table */ |
| 377 | /********************/ |
| 378 | |
| 379 | /* 480x640 */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 380 | static struct crt_mode_table CRTM480x640[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 381 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 382 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 383 | {REFRESH_60, M480X640_R60_HSP, M480X640_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 384 | {624, 480, 480, 144, 504, 48, 663, 640, 640, 23, 641, 3} } /* GTF*/ |
| 385 | }; |
| 386 | |
| 387 | /* 640x480*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 388 | static struct crt_mode_table CRTM640x480[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 389 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 390 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 391 | {REFRESH_60, M640X480_R60_HSP, M640X480_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 392 | {800, 640, 648, 144, 656, 96, 525, 480, 480, 45, 490, 2} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 393 | {REFRESH_75, M640X480_R75_HSP, M640X480_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 394 | {840, 640, 640, 200, 656, 64, 500, 480, 480, 20, 481, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 395 | {REFRESH_85, M640X480_R85_HSP, M640X480_R85_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 396 | {832, 640, 640, 192, 696, 56, 509, 480, 480, 29, 481, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 397 | {REFRESH_100, M640X480_R100_HSP, M640X480_R100_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 398 | {848, 640, 640, 208, 680, 64, 509, 480, 480, 29, 481, 3} }, /*GTF*/ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 399 | {REFRESH_120, M640X480_R120_HSP, M640X480_R120_VSP, |
| 400 | {848, 640, 640, 208, 680, 64, 515, 480, 480, 35, 481, 3} } /*GTF*/ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 401 | }; |
| 402 | |
| 403 | /*720x480 (GTF)*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 404 | static struct crt_mode_table CRTM720x480[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 405 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 406 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 407 | {REFRESH_60, M720X480_R60_HSP, M720X480_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 408 | {896, 720, 720, 176, 736, 72, 497, 480, 480, 17, 481, 3} } |
| 409 | |
| 410 | }; |
| 411 | |
| 412 | /*720x576 (GTF)*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 413 | static struct crt_mode_table CRTM720x576[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 414 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 415 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 416 | {REFRESH_60, M720X576_R60_HSP, M720X576_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 417 | {912, 720, 720, 192, 744, 72, 597, 576, 576, 21, 577, 3} } |
| 418 | }; |
| 419 | |
| 420 | /* 800x480 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 421 | static struct crt_mode_table CRTM800x480[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 422 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 423 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 424 | {REFRESH_60, M800X480_R60_HSP, M800X480_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 425 | {992, 800, 800, 192, 824, 72, 500, 480, 480, 20, 483, 7} } |
| 426 | }; |
| 427 | |
| 428 | /* 800x600*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 429 | static struct crt_mode_table CRTM800x600[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 430 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 431 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 432 | {REFRESH_60, M800X600_R60_HSP, M800X600_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 433 | {1056, 800, 800, 256, 840, 128, 628, 600, 600, 28, 601, 4} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 434 | {REFRESH_75, M800X600_R75_HSP, M800X600_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 435 | {1056, 800, 800, 256, 816, 80, 625, 600, 600, 25, 601, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 436 | {REFRESH_85, M800X600_R85_HSP, M800X600_R85_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 437 | {1048, 800, 800, 248, 832, 64, 631, 600, 600, 31, 601, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 438 | {REFRESH_100, M800X600_R100_HSP, M800X600_R100_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 439 | {1072, 800, 800, 272, 848, 88, 636, 600, 600, 36, 601, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 440 | {REFRESH_120, M800X600_R120_HSP, M800X600_R120_VSP, |
| 441 | {1088, 800, 800, 288, 856, 88, 643, 600, 600, 43, 601, 3} } |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 442 | }; |
| 443 | |
| 444 | /* 848x480 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 445 | static struct crt_mode_table CRTM848x480[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 446 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 447 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 448 | {REFRESH_60, M848X480_R60_HSP, M848X480_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 449 | {1056, 848, 848, 208, 872, 80, 500, 480, 480, 20, 483, 5} } |
| 450 | }; |
| 451 | |
| 452 | /*856x480 (GTF) convert to 852x480*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 453 | static struct crt_mode_table CRTM852x480[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 454 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 455 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 456 | {REFRESH_60, M852X480_R60_HSP, M852X480_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 457 | {1064, 856, 856, 208, 872, 88, 497, 480, 480, 17, 481, 3} } |
| 458 | }; |
| 459 | |
| 460 | /*1024x512 (GTF)*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 461 | static struct crt_mode_table CRTM1024x512[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 462 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 463 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 464 | {REFRESH_60, M1024X512_R60_HSP, M1024X512_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 465 | {1296, 1024, 1024, 272, 1056, 104, 531, 512, 512, 19, 513, 3} } |
| 466 | |
| 467 | }; |
| 468 | |
| 469 | /* 1024x600*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 470 | static struct crt_mode_table CRTM1024x600[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 471 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 472 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 473 | {REFRESH_60, M1024X600_R60_HSP, M1024X600_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 474 | {1312, 1024, 1024, 288, 1064, 104, 622, 600, 600, 22, 601, 3} }, |
| 475 | }; |
| 476 | |
| 477 | /* 1024x768*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 478 | static struct crt_mode_table CRTM1024x768[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 479 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 480 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 481 | {REFRESH_60, M1024X768_R60_HSP, M1024X768_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 482 | {1344, 1024, 1024, 320, 1048, 136, 806, 768, 768, 38, 771, 6} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 483 | {REFRESH_75, M1024X768_R75_HSP, M1024X768_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 484 | {1312, 1024, 1024, 288, 1040, 96, 800, 768, 768, 32, 769, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 485 | {REFRESH_85, M1024X768_R85_HSP, M1024X768_R85_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 486 | {1376, 1024, 1024, 352, 1072, 96, 808, 768, 768, 40, 769, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 487 | {REFRESH_100, M1024X768_R100_HSP, M1024X768_R100_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 488 | {1392, 1024, 1024, 368, 1096, 112, 814, 768, 768, 46, 769, 3} } |
| 489 | }; |
| 490 | |
| 491 | /* 1152x864*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 492 | static struct crt_mode_table CRTM1152x864[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 493 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 494 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 495 | {REFRESH_75, M1152X864_R75_HSP, M1152X864_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 496 | {1600, 1152, 1152, 448, 1216, 128, 900, 864, 864, 36, 865, 3} } |
| 497 | |
| 498 | }; |
| 499 | |
| 500 | /* 1280x720 (HDMI 720P)*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 501 | static struct crt_mode_table CRTM1280x720[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 502 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 503 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 504 | {REFRESH_60, M1280X720_R60_HSP, M1280X720_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 505 | {1648, 1280, 1280, 368, 1392, 40, 750, 720, 720, 30, 725, 5} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 506 | {REFRESH_50, M1280X720_R50_HSP, M1280X720_R50_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 507 | {1632, 1280, 1280, 352, 1328, 128, 741, 720, 720, 21, 721, 3} } |
| 508 | }; |
| 509 | |
| 510 | /*1280x768 (GTF)*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 511 | static struct crt_mode_table CRTM1280x768[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 512 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 513 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 514 | {REFRESH_60, M1280X768_R60_HSP, M1280X768_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 515 | {1680, 1280, 1280, 400, 1344, 136, 795, 768, 768, 27, 769, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 516 | {REFRESH_50, M1280X768_R50_HSP, M1280X768_R50_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 517 | {1648, 1280, 1280, 368, 1336, 128, 791, 768, 768, 23, 769, 3} } |
| 518 | }; |
| 519 | |
| 520 | /* 1280x800 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 521 | static struct crt_mode_table CRTM1280x800[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 522 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 523 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 524 | {REFRESH_60, M1280X800_R60_HSP, M1280X800_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 525 | {1680, 1280, 1280, 400, 1352, 128, 831, 800, 800, 31, 803, 6} } |
| 526 | }; |
| 527 | |
| 528 | /*1280x960*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 529 | static struct crt_mode_table CRTM1280x960[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 530 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 531 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 532 | {REFRESH_60, M1280X960_R60_HSP, M1280X960_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 533 | {1800, 1280, 1280, 520, 1376, 112, 1000, 960, 960, 40, 961, 3} } |
| 534 | }; |
| 535 | |
| 536 | /* 1280x1024*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 537 | static struct crt_mode_table CRTM1280x1024[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 538 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 539 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 540 | {REFRESH_60, M1280X1024_R60_HSP, M1280X1024_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 541 | {1688, 1280, 1280, 408, 1328, 112, 1066, 1024, 1024, 42, 1025, |
| 542 | 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 543 | {REFRESH_75, M1280X1024_R75_HSP, M1280X1024_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 544 | {1688, 1280, 1280, 408, 1296, 144, 1066, 1024, 1024, 42, 1025, |
| 545 | 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 546 | {REFRESH_85, M1280X1024_R85_HSP, M1280X1024_R85_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 547 | {1728, 1280, 1280, 448, 1344, 160, 1072, 1024, 1024, 48, 1025, 3} } |
| 548 | }; |
| 549 | |
| 550 | /* 1368x768 (GTF) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 551 | static struct crt_mode_table CRTM1368x768[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 552 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 553 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 554 | {REFRESH_60, M1368X768_R60_HSP, M1368X768_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 555 | {1800, 1368, 1368, 432, 1440, 144, 795, 768, 768, 27, 769, 3} } |
| 556 | }; |
| 557 | |
| 558 | /*1440x1050 (GTF)*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 559 | static struct crt_mode_table CRTM1440x1050[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 560 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 561 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 562 | {REFRESH_60, M1440X1050_R60_HSP, M1440X1050_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 563 | {1936, 1440, 1440, 496, 1536, 152, 1077, 1040, 1040, 37, 1041, 3} } |
| 564 | }; |
| 565 | |
| 566 | /* 1600x1200*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 567 | static struct crt_mode_table CRTM1600x1200[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 568 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 569 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 570 | {REFRESH_60, M1600X1200_R60_HSP, M1600X1200_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 571 | {2160, 1600, 1600, 560, 1664, 192, 1250, 1200, 1200, 50, 1201, |
| 572 | 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 573 | {REFRESH_75, M1600X1200_R75_HSP, M1600X1200_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 574 | {2160, 1600, 1600, 560, 1664, 192, 1250, 1200, 1200, 50, 1201, 3} } |
| 575 | |
| 576 | }; |
| 577 | |
| 578 | /* 1680x1050 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 579 | static struct crt_mode_table CRTM1680x1050[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 580 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 581 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 582 | {REFRESH_60, M1680x1050_R60_HSP, M1680x1050_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 583 | {2240, 1680, 1680, 560, 1784, 176, 1089, 1050, 1050, 39, 1053, |
| 584 | 6} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 585 | {REFRESH_75, M1680x1050_R75_HSP, M1680x1050_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 586 | {2272, 1680, 1680, 592, 1800, 176, 1099, 1050, 1050, 49, 1053, 6} } |
| 587 | }; |
| 588 | |
| 589 | /* 1680x1050 (CVT Reduce Blanking) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 590 | static struct crt_mode_table CRTM1680x1050_RB[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 591 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 592 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 593 | {REFRESH_60, M1680x1050_RB_R60_HSP, M1680x1050_RB_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 594 | {1840, 1680, 1680, 160, 1728, 32, 1080, 1050, 1050, 30, 1053, 6} } |
| 595 | }; |
| 596 | |
| 597 | /* 1920x1080 (CVT)*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 598 | static struct crt_mode_table CRTM1920x1080[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 599 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 600 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 601 | {REFRESH_60, M1920X1080_R60_HSP, M1920X1080_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 602 | {2576, 1920, 1920, 656, 2048, 200, 1120, 1080, 1080, 40, 1083, 5} } |
| 603 | }; |
| 604 | |
| 605 | /* 1920x1080 (CVT with Reduce Blanking) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 606 | static struct crt_mode_table CRTM1920x1080_RB[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 607 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 608 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 609 | {REFRESH_60, M1920X1080_RB_R60_HSP, M1920X1080_RB_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 610 | {2080, 1920, 1920, 160, 1968, 32, 1111, 1080, 1080, 31, 1083, 5} } |
| 611 | }; |
| 612 | |
| 613 | /* 1920x1440*/ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 614 | static struct crt_mode_table CRTM1920x1440[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 615 | /*r_rate,hsp,vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 616 | /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 617 | {REFRESH_60, M1920X1440_R60_HSP, M1920X1440_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 618 | {2600, 1920, 1920, 680, 2048, 208, 1500, 1440, 1440, 60, 1441, |
| 619 | 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 620 | {REFRESH_75, M1920X1440_R75_HSP, M1920X1440_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 621 | {2640, 1920, 1920, 720, 2064, 224, 1500, 1440, 1440, 60, 1441, 3} } |
| 622 | }; |
| 623 | |
| 624 | /* 1400x1050 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 625 | static struct crt_mode_table CRTM1400x1050[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 626 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 627 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 628 | {REFRESH_60, M1400X1050_R60_HSP, M1400X1050_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 629 | {1864, 1400, 1400, 464, 1488, 144, 1089, 1050, 1050, 39, 1053, |
| 630 | 4} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 631 | {REFRESH_75, M1400X1050_R75_HSP, M1400X1050_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 632 | {1896, 1400, 1400, 496, 1504, 144, 1099, 1050, 1050, 49, 1053, 4} } |
| 633 | }; |
| 634 | |
| 635 | /* 1400x1050 (CVT Reduce Blanking) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 636 | static struct crt_mode_table CRTM1400x1050_RB[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 637 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 638 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 639 | {REFRESH_60, M1400X1050_RB_R60_HSP, M1400X1050_RB_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 640 | {1560, 1400, 1400, 160, 1448, 32, 1080, 1050, 1050, 30, 1053, 4} } |
| 641 | }; |
| 642 | |
| 643 | /* 960x600 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 644 | static struct crt_mode_table CRTM960x600[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 645 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 646 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 647 | {REFRESH_60, M960X600_R60_HSP, M960X600_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 648 | {1216, 960, 960, 256, 992, 96, 624, 600, 600, 24, 603, 6} } |
| 649 | }; |
| 650 | |
| 651 | /* 1000x600 (GTF) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 652 | static struct crt_mode_table CRTM1000x600[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 653 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 654 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 655 | {REFRESH_60, M1000X600_R60_HSP, M1000X600_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 656 | {1288, 1000, 1000, 288, 1040, 104, 622, 600, 600, 22, 601, 3} } |
| 657 | }; |
| 658 | |
| 659 | /* 1024x576 (GTF) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 660 | static struct crt_mode_table CRTM1024x576[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 661 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 662 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 663 | {REFRESH_60, M1024X576_R60_HSP, M1024X576_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 664 | {1312, 1024, 1024, 288, 1064, 104, 597, 576, 576, 21, 577, 3} } |
| 665 | }; |
| 666 | |
| 667 | /* 1088x612 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 668 | static struct crt_mode_table CRTM1088x612[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 669 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 670 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 671 | {REFRESH_60, M1088X612_R60_HSP, M1088X612_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 672 | {1392, 1088, 1088, 304, 1136, 104, 636, 612, 612, 24, 615, 5} } |
| 673 | }; |
| 674 | |
| 675 | /* 1152x720 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 676 | static struct crt_mode_table CRTM1152x720[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 677 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 678 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 679 | {REFRESH_60, M1152X720_R60_HSP, M1152X720_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 680 | {1488, 1152, 1152, 336, 1208, 112, 748, 720, 720, 28, 723, 6} } |
| 681 | }; |
| 682 | |
| 683 | /* 1200x720 (GTF) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 684 | static struct crt_mode_table CRTM1200x720[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 685 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 686 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 687 | {REFRESH_60, M1200X720_R60_HSP, M1200X720_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 688 | {1568, 1200, 1200, 368, 1256, 128, 746, 720, 720, 26, 721, 3} } |
| 689 | }; |
| 690 | |
Chris Ball | c205d93 | 2009-06-07 13:59:51 -0400 | [diff] [blame] | 691 | /* 1200x900 (DCON) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 692 | static struct crt_mode_table DCON1200x900[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 693 | /* r_rate, hsp, vsp */ |
| 694 | {REFRESH_60, M1200X900_R60_HSP, M1200X900_R60_VSP, |
Chris Ball | c205d93 | 2009-06-07 13:59:51 -0400 | [diff] [blame] | 695 | /* The correct htotal is 1240, but this doesn't raster on VX855. */ |
| 696 | /* Via suggested changing to a multiple of 16, hence 1264. */ |
| 697 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
| 698 | {1264, 1200, 1200, 64, 1211, 32, 912, 900, 900, 12, 901, 10} } |
| 699 | }; |
| 700 | |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 701 | /* 1280x600 (GTF) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 702 | static struct crt_mode_table CRTM1280x600[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 703 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 704 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 705 | {REFRESH_60, M1280x600_R60_HSP, M1280x600_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 706 | {1648, 1280, 1280, 368, 1336, 128, 622, 600, 600, 22, 601, 3} } |
| 707 | }; |
| 708 | |
| 709 | /* 1360x768 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 710 | static struct crt_mode_table CRTM1360x768[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 711 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 712 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 713 | {REFRESH_60, M1360X768_R60_HSP, M1360X768_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 714 | {1776, 1360, 1360, 416, 1432, 136, 798, 768, 768, 30, 771, 5} } |
| 715 | }; |
| 716 | |
| 717 | /* 1360x768 (CVT Reduce Blanking) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 718 | static struct crt_mode_table CRTM1360x768_RB[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 719 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 720 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 721 | {REFRESH_60, M1360X768_RB_R60_HSP, M1360X768_RB_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 722 | {1520, 1360, 1360, 160, 1408, 32, 790, 768, 768, 22, 771, 5} } |
| 723 | }; |
| 724 | |
| 725 | /* 1366x768 (GTF) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 726 | static struct crt_mode_table CRTM1366x768[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 727 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 728 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 729 | {REFRESH_60, M1368X768_R60_HSP, M1368X768_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 730 | {1800, 1368, 1368, 432, 1440, 144, 795, 768, 768, 27, 769, 3} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 731 | {REFRESH_50, M1368X768_R50_HSP, M1368X768_R50_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 732 | {1768, 1368, 1368, 400, 1424, 144, 791, 768, 768, 23, 769, 3} } |
| 733 | }; |
| 734 | |
| 735 | /* 1440x900 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 736 | static struct crt_mode_table CRTM1440x900[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 737 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 738 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 739 | {REFRESH_60, M1440X900_R60_HSP, M1440X900_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 740 | {1904, 1440, 1440, 464, 1520, 152, 934, 900, 900, 34, 903, 6} }, |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 741 | {REFRESH_75, M1440X900_R75_HSP, M1440X900_R75_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 742 | {1936, 1440, 1440, 496, 1536, 152, 942, 900, 900, 42, 903, 6} } |
| 743 | }; |
| 744 | |
| 745 | /* 1440x900 (CVT Reduce Blanking) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 746 | static struct crt_mode_table CRTM1440x900_RB[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 747 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 748 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 749 | {REFRESH_60, M1440X900_RB_R60_HSP, M1440X900_RB_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 750 | {1600, 1440, 1440, 160, 1488, 32, 926, 900, 900, 26, 903, 6} } |
| 751 | }; |
| 752 | |
| 753 | /* 1600x900 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 754 | static struct crt_mode_table CRTM1600x900[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 755 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 756 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 757 | {REFRESH_60, M1600X900_R60_HSP, M1600X900_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 758 | {2112, 1600, 1600, 512, 1688, 168, 934, 900, 900, 34, 903, 5} } |
| 759 | }; |
| 760 | |
| 761 | /* 1600x900 (CVT Reduce Blanking) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 762 | static struct crt_mode_table CRTM1600x900_RB[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 763 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 764 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 765 | {REFRESH_60, M1600X900_RB_R60_HSP, M1600X900_RB_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 766 | {1760, 1600, 1600, 160, 1648, 32, 926, 900, 900, 26, 903, 5} } |
| 767 | }; |
| 768 | |
| 769 | /* 1600x1024 (GTF) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 770 | static struct crt_mode_table CRTM1600x1024[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 771 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 772 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 773 | {REFRESH_60, M1600X1024_R60_HSP, M1600X1024_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 774 | {2144, 1600, 1600, 544, 1704, 168, 1060, 1024, 1024, 36, 1025, 3} } |
| 775 | }; |
| 776 | |
| 777 | /* 1792x1344 (DMT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 778 | static struct crt_mode_table CRTM1792x1344[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 779 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 780 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 781 | {REFRESH_60, M1792x1344_R60_HSP, M1792x1344_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 782 | {2448, 1792, 1792, 656, 1920, 200, 1394, 1344, 1344, 50, 1345, 3} } |
| 783 | }; |
| 784 | |
| 785 | /* 1856x1392 (DMT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 786 | static struct crt_mode_table CRTM1856x1392[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 787 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 788 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 789 | {REFRESH_60, M1856x1392_R60_HSP, M1856x1392_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 790 | {2528, 1856, 1856, 672, 1952, 224, 1439, 1392, 1392, 47, 1393, 3} } |
| 791 | }; |
| 792 | |
| 793 | /* 1920x1200 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 794 | static struct crt_mode_table CRTM1920x1200[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 795 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 796 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 797 | {REFRESH_60, M1920X1200_R60_HSP, M1920X1200_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 798 | {2592, 1920, 1920, 672, 2056, 200, 1245, 1200, 1200, 45, 1203, 6} } |
| 799 | }; |
| 800 | |
| 801 | /* 1920x1200 (CVT with Reduce Blanking) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 802 | static struct crt_mode_table CRTM1920x1200_RB[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 803 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 804 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 805 | {REFRESH_60, M1920X1200_RB_R60_HSP, M1920X1200_RB_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 806 | {2080, 1920, 1920, 160, 1968, 32, 1235, 1200, 1200, 35, 1203, 6} } |
| 807 | }; |
| 808 | |
| 809 | /* 2048x1536 (CVT) */ |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 810 | static struct crt_mode_table CRTM2048x1536[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 811 | /* r_rate, hsp, vsp */ |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 812 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 813 | {REFRESH_60, M2048x1536_R60_HSP, M2048x1536_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 814 | {2800, 2048, 2048, 752, 2200, 224, 1592, 1536, 1536, 56, 1539, 4} } |
| 815 | }; |
| 816 | |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 817 | static struct VideoModeTable viafb_modes[] = { |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 818 | /* Display : 480x640 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 819 | {CRTM480x640, ARRAY_SIZE(CRTM480x640)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 820 | |
| 821 | /* Display : 640x480 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 822 | {CRTM640x480, ARRAY_SIZE(CRTM640x480)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 823 | |
| 824 | /* Display : 720x480 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 825 | {CRTM720x480, ARRAY_SIZE(CRTM720x480)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 826 | |
| 827 | /* Display : 720x576 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 828 | {CRTM720x576, ARRAY_SIZE(CRTM720x576)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 829 | |
| 830 | /* Display : 800x600 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 831 | {CRTM800x600, ARRAY_SIZE(CRTM800x600)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 832 | |
| 833 | /* Display : 800x480 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 834 | {CRTM800x480, ARRAY_SIZE(CRTM800x480)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 835 | |
| 836 | /* Display : 848x480 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 837 | {CRTM848x480, ARRAY_SIZE(CRTM848x480)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 838 | |
| 839 | /* Display : 852x480 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 840 | {CRTM852x480, ARRAY_SIZE(CRTM852x480)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 841 | |
| 842 | /* Display : 1024x512 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 843 | {CRTM1024x512, ARRAY_SIZE(CRTM1024x512)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 844 | |
| 845 | /* Display : 1024x600 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 846 | {CRTM1024x600, ARRAY_SIZE(CRTM1024x600)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 847 | |
| 848 | /* Display : 1024x768 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 849 | {CRTM1024x768, ARRAY_SIZE(CRTM1024x768)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 850 | |
| 851 | /* Display : 1152x864 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 852 | {CRTM1152x864, ARRAY_SIZE(CRTM1152x864)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 853 | |
| 854 | /* Display : 1280x768 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 855 | {CRTM1280x768, ARRAY_SIZE(CRTM1280x768)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 856 | |
| 857 | /* Display : 960x600 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 858 | {CRTM960x600, ARRAY_SIZE(CRTM960x600)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 859 | |
| 860 | /* Display : 1000x600 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 861 | {CRTM1000x600, ARRAY_SIZE(CRTM1000x600)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 862 | |
| 863 | /* Display : 1024x576 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 864 | {CRTM1024x576, ARRAY_SIZE(CRTM1024x576)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 865 | |
| 866 | /* Display : 1088x612 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 867 | {CRTM1088x612, ARRAY_SIZE(CRTM1088x612)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 868 | |
| 869 | /* Display : 1152x720 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 870 | {CRTM1152x720, ARRAY_SIZE(CRTM1152x720)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 871 | |
| 872 | /* Display : 1200x720 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 873 | {CRTM1200x720, ARRAY_SIZE(CRTM1200x720)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 874 | |
Chris Ball | c205d93 | 2009-06-07 13:59:51 -0400 | [diff] [blame] | 875 | /* Display : 1200x900 (DCON) */ |
| 876 | {DCON1200x900, ARRAY_SIZE(DCON1200x900)}, |
| 877 | |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 878 | /* Display : 1280x600 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 879 | {CRTM1280x600, ARRAY_SIZE(CRTM1280x600)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 880 | |
| 881 | /* Display : 1280x800 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 882 | {CRTM1280x800, ARRAY_SIZE(CRTM1280x800)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 883 | |
| 884 | /* Display : 1280x960 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 885 | {CRTM1280x960, ARRAY_SIZE(CRTM1280x960)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 886 | |
| 887 | /* Display : 1280x1024 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 888 | {CRTM1280x1024, ARRAY_SIZE(CRTM1280x1024)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 889 | |
| 890 | /* Display : 1360x768 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 891 | {CRTM1360x768, ARRAY_SIZE(CRTM1360x768)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 892 | |
| 893 | /* Display : 1366x768 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 894 | {CRTM1366x768, ARRAY_SIZE(CRTM1366x768)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 895 | |
| 896 | /* Display : 1368x768 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 897 | {CRTM1368x768, ARRAY_SIZE(CRTM1368x768)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 898 | |
| 899 | /* Display : 1440x900 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 900 | {CRTM1440x900, ARRAY_SIZE(CRTM1440x900)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 901 | |
| 902 | /* Display : 1440x1050 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 903 | {CRTM1440x1050, ARRAY_SIZE(CRTM1440x1050)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 904 | |
| 905 | /* Display : 1600x900 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 906 | {CRTM1600x900, ARRAY_SIZE(CRTM1600x900)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 907 | |
| 908 | /* Display : 1600x1024 (GTF) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 909 | {CRTM1600x1024, ARRAY_SIZE(CRTM1600x1024)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 910 | |
| 911 | /* Display : 1600x1200 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 912 | {CRTM1600x1200, ARRAY_SIZE(CRTM1600x1200)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 913 | |
| 914 | /* Display : 1680x1050 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 915 | {CRTM1680x1050, ARRAY_SIZE(CRTM1680x1050)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 916 | |
| 917 | /* Display : 1792x1344 (DMT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 918 | {CRTM1792x1344, ARRAY_SIZE(CRTM1792x1344)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 919 | |
| 920 | /* Display : 1856x1392 (DMT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 921 | {CRTM1856x1392, ARRAY_SIZE(CRTM1856x1392)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 922 | |
| 923 | /* Display : 1920x1440 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 924 | {CRTM1920x1440, ARRAY_SIZE(CRTM1920x1440)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 925 | |
| 926 | /* Display : 2048x1536 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 927 | {CRTM2048x1536, ARRAY_SIZE(CRTM2048x1536)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 928 | |
| 929 | /* Display : 1280x720 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 930 | {CRTM1280x720, ARRAY_SIZE(CRTM1280x720)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 931 | |
| 932 | /* Display : 1920x1080 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 933 | {CRTM1920x1080, ARRAY_SIZE(CRTM1920x1080)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 934 | |
| 935 | /* Display : 1920x1200 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 936 | {CRTM1920x1200, ARRAY_SIZE(CRTM1920x1200)}, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 937 | |
| 938 | /* Display : 1400x1050 (CVT) */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 939 | {CRTM1400x1050, ARRAY_SIZE(CRTM1400x1050)} |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 940 | }; |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 941 | |
Stephen Hemminger | 23e5abd | 2011-03-03 10:00:08 -0800 | [diff] [blame] | 942 | static struct VideoModeTable viafb_rb_modes[] = { |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 943 | /* Display : 1360x768 (CVT Reduce Blanking) */ |
| 944 | {CRTM1360x768_RB, ARRAY_SIZE(CRTM1360x768_RB)}, |
| 945 | |
| 946 | /* Display : 1440x900 (CVT Reduce Blanking) */ |
| 947 | {CRTM1440x900_RB, ARRAY_SIZE(CRTM1440x900_RB)}, |
| 948 | |
| 949 | /* Display : 1400x1050 (CVT Reduce Blanking) */ |
| 950 | {CRTM1400x1050_RB, ARRAY_SIZE(CRTM1400x1050_RB)}, |
| 951 | |
| 952 | /* Display : 1600x900 (CVT Reduce Blanking) */ |
| 953 | {CRTM1600x900_RB, ARRAY_SIZE(CRTM1600x900_RB)}, |
| 954 | |
| 955 | /* Display : 1680x1050 (CVT Reduce Blanking) */ |
| 956 | {CRTM1680x1050_RB, ARRAY_SIZE(CRTM1680x1050_RB)}, |
| 957 | |
| 958 | /* Display : 1920x1080 (CVT Reduce Blanking) */ |
| 959 | {CRTM1920x1080_RB, ARRAY_SIZE(CRTM1920x1080_RB)}, |
| 960 | |
| 961 | /* Display : 1920x1200 (CVT Reduce Blanking) */ |
| 962 | {CRTM1920x1200_RB, ARRAY_SIZE(CRTM1920x1200_RB)} |
| 963 | }; |
| 964 | |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 965 | struct crt_mode_table CEAM1280x720[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 966 | {REFRESH_60, M1280X720_CEA_R60_HSP, M1280X720_CEA_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 967 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
| 968 | {1650, 1280, 1280, 370, 1390, 40, 750, 720, 720, 30, 725, 5} } |
| 969 | }; |
| 970 | struct crt_mode_table CEAM1920x1080[] = { |
Florian Tobias Schandinat | fd3cc69 | 2011-03-11 00:04:01 +0000 | [diff] [blame^] | 971 | {REFRESH_60, M1920X1080_CEA_R60_HSP, M1920X1080_CEA_R60_VSP, |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 972 | /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ |
| 973 | {2200, 1920, 1920, 300, 2008, 44, 1125, 1080, 1080, 45, 1084, 5} } |
| 974 | }; |
| 975 | struct VideoModeTable CEA_HDMI_Modes[] = { |
| 976 | /* Display : 1280x720 */ |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 977 | {CEAM1280x720, ARRAY_SIZE(CEAM1280x720)}, |
| 978 | {CEAM1920x1080, ARRAY_SIZE(CEAM1920x1080)} |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 979 | }; |
Florian Tobias Schandinat | deb7aab | 2009-09-22 16:47:16 -0700 | [diff] [blame] | 980 | |
Florian Tobias Schandinat | deb7aab | 2009-09-22 16:47:16 -0700 | [diff] [blame] | 981 | int NUM_TOTAL_CEA_MODES = ARRAY_SIZE(CEA_HDMI_Modes); |
| 982 | int NUM_TOTAL_CN400_ModeXregs = ARRAY_SIZE(CN400_ModeXregs); |
| 983 | int NUM_TOTAL_CN700_ModeXregs = ARRAY_SIZE(CN700_ModeXregs); |
| 984 | int NUM_TOTAL_KM400_ModeXregs = ARRAY_SIZE(KM400_ModeXregs); |
| 985 | int NUM_TOTAL_CX700_ModeXregs = ARRAY_SIZE(CX700_ModeXregs); |
Harald Welte | 0306ab1 | 2009-09-22 16:47:35 -0700 | [diff] [blame] | 986 | int NUM_TOTAL_VX855_ModeXregs = ARRAY_SIZE(VX855_ModeXregs); |
Florian Tobias Schandinat | deb7aab | 2009-09-22 16:47:16 -0700 | [diff] [blame] | 987 | int NUM_TOTAL_CLE266_ModeXregs = ARRAY_SIZE(CLE266_ModeXregs); |
| 988 | int NUM_TOTAL_PATCH_MODE = ARRAY_SIZE(res_patch_table); |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 989 | |
| 990 | |
| 991 | struct VideoModeTable *viafb_get_mode(int hres, int vres) |
| 992 | { |
| 993 | u32 i; |
| 994 | for (i = 0; i < ARRAY_SIZE(viafb_modes); i++) |
| 995 | if (viafb_modes[i].mode_array && |
| 996 | viafb_modes[i].crtc[0].crtc.hor_addr == hres && |
| 997 | viafb_modes[i].crtc[0].crtc.ver_addr == vres) |
| 998 | return &viafb_modes[i]; |
| 999 | |
| 1000 | return NULL; |
| 1001 | } |
| 1002 | |
| 1003 | struct VideoModeTable *viafb_get_rb_mode(int hres, int vres) |
| 1004 | { |
| 1005 | u32 i; |
| 1006 | for (i = 0; i < ARRAY_SIZE(viafb_rb_modes); i++) |
| 1007 | if (viafb_rb_modes[i].mode_array && |
| 1008 | viafb_rb_modes[i].crtc[0].crtc.hor_addr == hres && |
| 1009 | viafb_rb_modes[i].crtc[0].crtc.ver_addr == vres) |
| 1010 | return &viafb_rb_modes[i]; |
| 1011 | |
| 1012 | return NULL; |
| 1013 | } |