Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. |
| 3 | * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. |
| 4 | |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public |
| 7 | * License as published by the Free Software Foundation; |
| 8 | * either version 2, or (at your option) any later version. |
| 9 | |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even |
| 12 | * the implied warranty of MERCHANTABILITY or FITNESS FOR |
| 13 | * A PARTICULAR PURPOSE.See the GNU General Public License |
| 14 | * for more details. |
| 15 | |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., |
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef __VIAMODE_H__ |
| 23 | #define __VIAMODE_H__ |
| 24 | |
| 25 | #include "global.h" |
| 26 | |
| 27 | struct VPITTable { |
| 28 | unsigned char Misc; |
| 29 | unsigned char SR[StdSR]; |
| 30 | unsigned char GR[StdGR]; |
| 31 | unsigned char AR[StdAR]; |
| 32 | }; |
| 33 | |
| 34 | struct VideoModeTable { |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 35 | struct crt_mode_table *crtc; |
| 36 | int mode_array; |
| 37 | }; |
| 38 | |
| 39 | struct patch_table { |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 40 | int table_length; |
| 41 | struct io_reg *io_reg_table; |
| 42 | }; |
| 43 | |
| 44 | struct res_map_refresh { |
| 45 | int hres; |
| 46 | int vres; |
| 47 | int pixclock; |
| 48 | int vmode_refresh; |
| 49 | }; |
| 50 | |
Florian Tobias Schandinat | deb7aab | 2009-09-22 16:47:16 -0700 | [diff] [blame] | 51 | extern int NUM_TOTAL_RES_MAP_REFRESH; |
| 52 | extern int NUM_TOTAL_CEA_MODES; |
| 53 | extern int NUM_TOTAL_CN400_ModeXregs; |
| 54 | extern int NUM_TOTAL_CN700_ModeXregs; |
| 55 | extern int NUM_TOTAL_KM400_ModeXregs; |
| 56 | extern int NUM_TOTAL_CX700_ModeXregs; |
Harald Welte | 0306ab1 | 2009-09-22 16:47:35 -0700 | [diff] [blame] | 57 | extern int NUM_TOTAL_VX855_ModeXregs; |
Florian Tobias Schandinat | deb7aab | 2009-09-22 16:47:16 -0700 | [diff] [blame] | 58 | extern int NUM_TOTAL_CLE266_ModeXregs; |
| 59 | extern int NUM_TOTAL_PATCH_MODE; |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 60 | |
| 61 | /********************/ |
| 62 | /* Mode Table */ |
| 63 | /********************/ |
| 64 | |
Florian Tobias Schandinat | deb7aab | 2009-09-22 16:47:16 -0700 | [diff] [blame] | 65 | extern struct crt_mode_table CEAM1280x720[]; |
| 66 | extern struct crt_mode_table CEAM1920x1080[]; |
| 67 | extern struct VideoModeTable CEA_HDMI_Modes[]; |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 68 | |
Florian Tobias Schandinat | deb7aab | 2009-09-22 16:47:16 -0700 | [diff] [blame] | 69 | extern struct res_map_refresh res_map_refresh_tbl[]; |
| 70 | extern struct io_reg CN400_ModeXregs[]; |
| 71 | extern struct io_reg CN700_ModeXregs[]; |
| 72 | extern struct io_reg KM400_ModeXregs[]; |
| 73 | extern struct io_reg CX700_ModeXregs[]; |
| 74 | extern struct io_reg VX800_ModeXregs[]; |
Harald Welte | 0306ab1 | 2009-09-22 16:47:35 -0700 | [diff] [blame] | 75 | extern struct io_reg VX855_ModeXregs[]; |
Florian Tobias Schandinat | deb7aab | 2009-09-22 16:47:16 -0700 | [diff] [blame] | 76 | extern struct io_reg CLE266_ModeXregs[]; |
| 77 | extern struct io_reg PM1024x768[]; |
| 78 | extern struct patch_table res_patch_table[]; |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 79 | extern struct VPITTable VPIT; |
Florian Tobias Schandinat | dd73d68 | 2010-03-10 15:21:28 -0800 | [diff] [blame] | 80 | |
| 81 | struct VideoModeTable *viafb_get_mode(int hres, int vres); |
| 82 | struct VideoModeTable *viafb_get_rb_mode(int hres, int vres); |
| 83 | |
Joseph Chan | 9f29163 | 2008-10-15 22:03:29 -0700 | [diff] [blame] | 84 | #endif /* __VIAMODE_H__ */ |