blob: dd19106698e7c913bee86e985c02528869f568db [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
22#ifndef __VIAMODE_H__
23#define __VIAMODE_H__
24
25#include "global.h"
26
27struct VPITTable {
28 unsigned char Misc;
29 unsigned char SR[StdSR];
30 unsigned char GR[StdGR];
31 unsigned char AR[StdAR];
32};
33
Joseph Chan9f291632008-10-15 22:03:29 -070034struct patch_table {
Joseph Chan9f291632008-10-15 22:03:29 -070035 int table_length;
36 struct io_reg *io_reg_table;
37};
38
Florian Tobias Schandinatdeb7aab2009-09-22 16:47:16 -070039extern int NUM_TOTAL_CN400_ModeXregs;
40extern int NUM_TOTAL_CN700_ModeXregs;
41extern int NUM_TOTAL_KM400_ModeXregs;
42extern int NUM_TOTAL_CX700_ModeXregs;
Harald Welte0306ab12009-09-22 16:47:35 -070043extern int NUM_TOTAL_VX855_ModeXregs;
Florian Tobias Schandinatdeb7aab2009-09-22 16:47:16 -070044extern int NUM_TOTAL_CLE266_ModeXregs;
45extern int NUM_TOTAL_PATCH_MODE;
Joseph Chan9f291632008-10-15 22:03:29 -070046
Florian Tobias Schandinatdeb7aab2009-09-22 16:47:16 -070047extern struct io_reg CN400_ModeXregs[];
48extern struct io_reg CN700_ModeXregs[];
49extern struct io_reg KM400_ModeXregs[];
50extern struct io_reg CX700_ModeXregs[];
51extern struct io_reg VX800_ModeXregs[];
Harald Welte0306ab12009-09-22 16:47:35 -070052extern struct io_reg VX855_ModeXregs[];
Florian Tobias Schandinatdeb7aab2009-09-22 16:47:16 -070053extern struct io_reg CLE266_ModeXregs[];
54extern struct io_reg PM1024x768[];
55extern struct patch_table res_patch_table[];
Joseph Chan9f291632008-10-15 22:03:29 -070056extern struct VPITTable VPIT;
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -080057
Florian Tobias Schandinat9864ca22012-02-17 07:55:06 +000058const struct fb_videomode *viafb_get_best_mode(int hres, int vres,
59 int refresh);
60const struct fb_videomode *viafb_get_best_rb_mode(int hres, int vres,
61 int refresh);
Florian Tobias Schandinatdd73d682010-03-10 15:21:28 -080062
Joseph Chan9f291632008-10-15 22:03:29 -070063#endif /* __VIAMODE_H__ */