1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
4 * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
11 #include "via_modesetting.h"
13 /* Define Bit Field */
23 /* Video Memory Size */
24 #define VIDEO_MEMORY_SIZE_16M 0x1000000
27 * Lengths of the VPIT structure arrays.
40 /* Define Color Depth */
49 /* Sequencer Registers */
94 /* CRT Controller Registers */
121 /* Extend CRT Controller Registers */
243 #define LUT_DATA 0x3C9 /* DACDATA */
244 #define LUT_INDEX_READ 0x3C7 /* DACRX */
245 #define LUT_INDEX_WRITE 0x3C8 /* DACWX */
246 #define DACMASK 0x3C6
248 /* Definition Device */
249 #define DEVICE_CRT 0x01
250 #define DEVICE_DVI 0x03
251 #define DEVICE_LCD 0x04
253 /* Device output interface */
254 #define INTERFACE_NONE 0x00
255 #define INTERFACE_ANALOG_RGB 0x01
256 #define INTERFACE_DVP0 0x02
257 #define INTERFACE_DVP1 0x03
258 #define INTERFACE_DFP_HIGH 0x04
259 #define INTERFACE_DFP_LOW 0x05
260 #define INTERFACE_DFP 0x06
261 #define INTERFACE_LVDS0 0x07
262 #define INTERFACE_LVDS1 0x08
263 #define INTERFACE_LVDS0LVDS1 0x09
264 #define INTERFACE_TMDS 0x0A
266 #define HW_LAYOUT_LCD_ONLY 0x01
267 #define HW_LAYOUT_DVI_ONLY 0x02
268 #define HW_LAYOUT_LCD_DVI 0x03
269 #define HW_LAYOUT_LCD1_LCD2 0x04
270 #define HW_LAYOUT_LCD_EXTERNAL_LCD2 0x10
272 /* Definition CRTC Timing Index */
273 #define H_TOTAL_INDEX 0
274 #define H_ADDR_INDEX 1
275 #define H_BLANK_START_INDEX 2
276 #define H_BLANK_END_INDEX 3
277 #define H_SYNC_START_INDEX 4
278 #define H_SYNC_END_INDEX 5
279 #define V_TOTAL_INDEX 6
280 #define V_ADDR_INDEX 7
281 #define V_BLANK_START_INDEX 8
282 #define V_BLANK_END_INDEX 9
283 #define V_SYNC_START_INDEX 10
284 #define V_SYNC_END_INDEX 11
285 #define H_TOTAL_SHADOW_INDEX 12
286 #define H_BLANK_END_SHADOW_INDEX 13
287 #define V_TOTAL_SHADOW_INDEX 14
288 #define V_ADDR_SHADOW_INDEX 15
289 #define V_BLANK_SATRT_SHADOW_INDEX 16
290 #define V_BLANK_END_SHADOW_INDEX 17
291 #define V_SYNC_SATRT_SHADOW_INDEX 18
292 #define V_SYNC_END_SHADOW_INDEX 19
294 /* LCD display method
296 #define LCD_EXPANDSION 0x00
297 #define LCD_CENTERING 0x01
301 #define LCD_OPENLDI 0x00
302 #define LCD_SPWG 0x01
304 struct crt_mode_table
{
308 struct via_display_timing crtc
;
318 #endif /* __SHARE_H__ */