xref: /openbmc/linux/drivers/video/fbdev/via/viamode.h (revision 55fd7e02)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
4  * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
5 
6  */
7 
8 #ifndef __VIAMODE_H__
9 #define __VIAMODE_H__
10 
11 #include "global.h"
12 
13 struct VPITTable {
14 	unsigned char Misc;
15 	unsigned char SR[StdSR];
16 	unsigned char GR[StdGR];
17 	unsigned char AR[StdAR];
18 };
19 
20 struct patch_table {
21 	int table_length;
22 	struct io_reg *io_reg_table;
23 };
24 
25 extern int NUM_TOTAL_CN400_ModeXregs;
26 extern int NUM_TOTAL_CN700_ModeXregs;
27 extern int NUM_TOTAL_KM400_ModeXregs;
28 extern int NUM_TOTAL_CX700_ModeXregs;
29 extern int NUM_TOTAL_VX855_ModeXregs;
30 extern int NUM_TOTAL_CLE266_ModeXregs;
31 extern int NUM_TOTAL_PATCH_MODE;
32 
33 extern struct io_reg CN400_ModeXregs[];
34 extern struct io_reg CN700_ModeXregs[];
35 extern struct io_reg KM400_ModeXregs[];
36 extern struct io_reg CX700_ModeXregs[];
37 extern struct io_reg VX800_ModeXregs[];
38 extern struct io_reg VX855_ModeXregs[];
39 extern struct io_reg CLE266_ModeXregs[];
40 extern struct io_reg PM1024x768[];
41 extern struct patch_table res_patch_table[];
42 extern struct VPITTable VPIT;
43 
44 const struct fb_videomode *viafb_get_best_mode(int hres, int vres,
45 	int refresh);
46 const struct fb_videomode *viafb_get_best_rb_mode(int hres, int vres,
47 	int refresh);
48 
49 #endif /* __VIAMODE_H__ */
50