2 * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
3 * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
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.
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
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
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include "via_modesetting.h"
27 /* Define Bit Field */
37 /* Video Memory Size */
38 #define VIDEO_MEMORY_SIZE_16M 0x1000000
41 * Lengths of the VPIT structure arrays.
54 /* Define Color Depth */
63 /* Sequencer Registers */
108 /* CRT Controller Registers */
135 /* Extend CRT Controller Registers */
257 #define LUT_DATA 0x3C9 /* DACDATA */
258 #define LUT_INDEX_READ 0x3C7 /* DACRX */
259 #define LUT_INDEX_WRITE 0x3C8 /* DACWX */
260 #define DACMASK 0x3C6
262 /* Definition Device */
263 #define DEVICE_CRT 0x01
264 #define DEVICE_DVI 0x03
265 #define DEVICE_LCD 0x04
267 /* Device output interface */
268 #define INTERFACE_NONE 0x00
269 #define INTERFACE_ANALOG_RGB 0x01
270 #define INTERFACE_DVP0 0x02
271 #define INTERFACE_DVP1 0x03
272 #define INTERFACE_DFP_HIGH 0x04
273 #define INTERFACE_DFP_LOW 0x05
274 #define INTERFACE_DFP 0x06
275 #define INTERFACE_LVDS0 0x07
276 #define INTERFACE_LVDS1 0x08
277 #define INTERFACE_LVDS0LVDS1 0x09
278 #define INTERFACE_TMDS 0x0A
280 #define HW_LAYOUT_LCD_ONLY 0x01
281 #define HW_LAYOUT_DVI_ONLY 0x02
282 #define HW_LAYOUT_LCD_DVI 0x03
283 #define HW_LAYOUT_LCD1_LCD2 0x04
284 #define HW_LAYOUT_LCD_EXTERNAL_LCD2 0x10
286 /* Definition CRTC Timing Index */
287 #define H_TOTAL_INDEX 0
288 #define H_ADDR_INDEX 1
289 #define H_BLANK_START_INDEX 2
290 #define H_BLANK_END_INDEX 3
291 #define H_SYNC_START_INDEX 4
292 #define H_SYNC_END_INDEX 5
293 #define V_TOTAL_INDEX 6
294 #define V_ADDR_INDEX 7
295 #define V_BLANK_START_INDEX 8
296 #define V_BLANK_END_INDEX 9
297 #define V_SYNC_START_INDEX 10
298 #define V_SYNC_END_INDEX 11
299 #define H_TOTAL_SHADOW_INDEX 12
300 #define H_BLANK_END_SHADOW_INDEX 13
301 #define V_TOTAL_SHADOW_INDEX 14
302 #define V_ADDR_SHADOW_INDEX 15
303 #define V_BLANK_SATRT_SHADOW_INDEX 16
304 #define V_BLANK_END_SHADOW_INDEX 17
305 #define V_SYNC_SATRT_SHADOW_INDEX 18
306 #define V_SYNC_END_SHADOW_INDEX 19
308 /* LCD display method
310 #define LCD_EXPANDSION 0x00
311 #define LCD_CENTERING 0x01
315 #define LCD_OPENLDI 0x00
316 #define LCD_SPWG 0x01
318 struct crt_mode_table
{
322 struct via_display_timing crtc
;
332 #endif /* __SHARE_H__ */