aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2009-09-22 19:47:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:52 -0400
commitdeb7aab6379502fd173cd34efa005108eb0b111b (patch)
tree65d0bf6ad6ff3cecc98d404766ad7937212f99bd
parentbc6932bb4a25ced97c4f201874573e6097237b78 (diff)
viafb: clean up viamode.h
Remove unneeeded declarations from the header and makes it more maintainable by evaluating the array size in the file the array exist in and exporting it via variables. This removes the need to keep the array size in the header in sync with the real array size. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Scott Fang <ScottFang@viatech.com.cn> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Harald Welte <laforge@gnumonks.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/video/via/viamode.c10
-rw-r--r--drivers/video/via/viamode.h138
2 files changed, 32 insertions, 116 deletions
diff --git a/drivers/video/via/viamode.c b/drivers/video/via/viamode.c
index 7abd65dacb60..9ff9424ea6c3 100644
--- a/drivers/video/via/viamode.c
+++ b/drivers/video/via/viamode.c
@@ -1006,3 +1006,13 @@ struct VideoModeTable CEA_HDMI_Modes[] = {
1006 {VIA_RES_1280X720, CEAM1280x720, ARRAY_SIZE(CEAM1280x720)}, 1006 {VIA_RES_1280X720, CEAM1280x720, ARRAY_SIZE(CEAM1280x720)},
1007 {VIA_RES_1920X1080, CEAM1920x1080, ARRAY_SIZE(CEAM1920x1080)} 1007 {VIA_RES_1920X1080, CEAM1920x1080, ARRAY_SIZE(CEAM1920x1080)}
1008}; 1008};
1009
1010int NUM_TOTAL_RES_MAP_REFRESH = ARRAY_SIZE(res_map_refresh_tbl);
1011int NUM_TOTAL_CEA_MODES = ARRAY_SIZE(CEA_HDMI_Modes);
1012int NUM_TOTAL_CN400_ModeXregs = ARRAY_SIZE(CN400_ModeXregs);
1013int NUM_TOTAL_CN700_ModeXregs = ARRAY_SIZE(CN700_ModeXregs);
1014int NUM_TOTAL_KM400_ModeXregs = ARRAY_SIZE(KM400_ModeXregs);
1015int NUM_TOTAL_CX700_ModeXregs = ARRAY_SIZE(CX700_ModeXregs);
1016int NUM_TOTAL_CLE266_ModeXregs = ARRAY_SIZE(CLE266_ModeXregs);
1017int NUM_TOTAL_PATCH_MODE = ARRAY_SIZE(res_patch_table);
1018int NUM_TOTAL_MODETABLE = ARRAY_SIZE(CLE266Modes);
diff --git a/drivers/video/via/viamode.h b/drivers/video/via/viamode.h
index 2ec8bfee06f1..504e16a9b515 100644
--- a/drivers/video/via/viamode.h
+++ b/drivers/video/via/viamode.h
@@ -50,127 +50,33 @@ struct res_map_refresh {
50 int vmode_refresh; 50 int vmode_refresh;
51}; 51};
52 52
53#define NUM_TOTAL_RES_MAP_REFRESH ARRAY_SIZE(res_map_refresh_tbl) 53extern int NUM_TOTAL_RES_MAP_REFRESH;
54#define NUM_TOTAL_CEA_MODES ARRAY_SIZE(CEA_HDMI_Modes) 54extern int NUM_TOTAL_CEA_MODES;
55#define NUM_TOTAL_CN400_ModeXregs ARRAY_SIZE(CN400_ModeXregs) 55extern int NUM_TOTAL_CN400_ModeXregs;
56#define NUM_TOTAL_CN700_ModeXregs ARRAY_SIZE(CN700_ModeXregs) 56extern int NUM_TOTAL_CN700_ModeXregs;
57#define NUM_TOTAL_KM400_ModeXregs ARRAY_SIZE(KM400_ModeXregs) 57extern int NUM_TOTAL_KM400_ModeXregs;
58#define NUM_TOTAL_CX700_ModeXregs ARRAY_SIZE(CX700_ModeXregs) 58extern int NUM_TOTAL_CX700_ModeXregs;
59#define NUM_TOTAL_CLE266_ModeXregs ARRAY_SIZE(CLE266_ModeXregs) 59extern int NUM_TOTAL_CLE266_ModeXregs;
60#define NUM_TOTAL_PATCH_MODE ARRAY_SIZE(res_patch_table) 60extern int NUM_TOTAL_PATCH_MODE;
61#define NUM_TOTAL_MODETABLE ARRAY_SIZE(CLE266Modes) 61extern int NUM_TOTAL_MODETABLE;
62 62
63/********************/ 63/********************/
64/* Mode Table */ 64/* Mode Table */
65/********************/ 65/********************/
66 66
67/* 480x640 */ 67extern struct VideoModeTable CLE266Modes[];
68extern struct crt_mode_table CRTM480x640[1]; 68extern struct crt_mode_table CEAM1280x720[];
69/* 640x480*/ 69extern struct crt_mode_table CEAM1920x1080[];
70extern struct crt_mode_table CRTM640x480[5]; 70extern struct VideoModeTable CEA_HDMI_Modes[];
71/*720x480 (GTF)*/
72extern struct crt_mode_table CRTM720x480[1];
73/*720x576 (GTF)*/
74extern struct crt_mode_table CRTM720x576[1];
75/* 800x480 (CVT) */
76extern struct crt_mode_table CRTM800x480[1];
77/* 800x600*/
78extern struct crt_mode_table CRTM800x600[5];
79/* 848x480 (CVT) */
80extern struct crt_mode_table CRTM848x480[1];
81/*856x480 (GTF) convert to 852x480*/
82extern struct crt_mode_table CRTM852x480[1];
83/*1024x512 (GTF)*/
84extern struct crt_mode_table CRTM1024x512[1];
85/* 1024x600*/
86extern struct crt_mode_table CRTM1024x600[1];
87/* 1024x768*/
88extern struct crt_mode_table CRTM1024x768[4];
89/* 1152x864*/
90extern struct crt_mode_table CRTM1152x864[1];
91/* 1280x720 (HDMI 720P)*/
92extern struct crt_mode_table CRTM1280x720[2];
93/*1280x768 (GTF)*/
94extern struct crt_mode_table CRTM1280x768[2];
95/* 1280x800 (CVT) */
96extern struct crt_mode_table CRTM1280x800[1];
97/*1280x960*/
98extern struct crt_mode_table CRTM1280x960[1];
99/* 1280x1024*/
100extern struct crt_mode_table CRTM1280x1024[3];
101/* 1368x768 (GTF) */
102extern struct crt_mode_table CRTM1368x768[1];
103/*1440x1050 (GTF)*/
104extern struct crt_mode_table CRTM1440x1050[1];
105/* 1600x1200*/
106extern struct crt_mode_table CRTM1600x1200[2];
107/* 1680x1050 (CVT) */
108extern struct crt_mode_table CRTM1680x1050[2];
109/* 1680x1050 (CVT Reduce Blanking) */
110extern struct crt_mode_table CRTM1680x1050_RB[1];
111/* 1920x1080 (CVT)*/
112extern struct crt_mode_table CRTM1920x1080[1];
113/* 1920x1080 (CVT with Reduce Blanking) */
114extern struct crt_mode_table CRTM1920x1080_RB[1];
115/* 1920x1440*/
116extern struct crt_mode_table CRTM1920x1440[2];
117/* 1400x1050 (CVT) */
118extern struct crt_mode_table CRTM1400x1050[2];
119/* 1400x1050 (CVT Reduce Blanking) */
120extern struct crt_mode_table CRTM1400x1050_RB[1];
121/* 960x600 (CVT) */
122extern struct crt_mode_table CRTM960x600[1];
123/* 1000x600 (GTF) */
124extern struct crt_mode_table CRTM1000x600[1];
125/* 1024x576 (GTF) */
126extern struct crt_mode_table CRTM1024x576[1];
127/* 1088x612 (CVT) */
128extern struct crt_mode_table CRTM1088x612[1];
129/* 1152x720 (CVT) */
130extern struct crt_mode_table CRTM1152x720[1];
131/* 1200x720 (GTF) */
132extern struct crt_mode_table CRTM1200x720[1];
133/* 1280x600 (GTF) */
134extern struct crt_mode_table CRTM1280x600[1];
135/* 1360x768 (CVT) */
136extern struct crt_mode_table CRTM1360x768[1];
137/* 1360x768 (CVT Reduce Blanking) */
138extern struct crt_mode_table CRTM1360x768_RB[1];
139/* 1366x768 (GTF) */
140extern struct crt_mode_table CRTM1366x768[2];
141/* 1440x900 (CVT) */
142extern struct crt_mode_table CRTM1440x900[2];
143/* 1440x900 (CVT Reduce Blanking) */
144extern struct crt_mode_table CRTM1440x900_RB[1];
145/* 1600x900 (CVT) */
146extern struct crt_mode_table CRTM1600x900[1];
147/* 1600x900 (CVT Reduce Blanking) */
148extern struct crt_mode_table CRTM1600x900_RB[1];
149/* 1600x1024 (GTF) */
150extern struct crt_mode_table CRTM1600x1024[1];
151/* 1792x1344 (DMT) */
152extern struct crt_mode_table CRTM1792x1344[1];
153/* 1856x1392 (DMT) */
154extern struct crt_mode_table CRTM1856x1392[1];
155/* 1920x1200 (CVT) */
156extern struct crt_mode_table CRTM1920x1200[1];
157/* 1920x1200 (CVT with Reduce Blanking) */
158extern struct crt_mode_table CRTM1920x1200_RB[1];
159/* 2048x1536 (CVT) */
160extern struct crt_mode_table CRTM2048x1536[1];
161extern struct VideoModeTable CLE266Modes[47];
162extern struct crt_mode_table CEAM1280x720[1];
163extern struct crt_mode_table CEAM1920x1080[1];
164extern struct VideoModeTable CEA_HDMI_Modes[2];
165 71
166extern struct res_map_refresh res_map_refresh_tbl[61]; 72extern struct res_map_refresh res_map_refresh_tbl[];
167extern struct io_reg CN400_ModeXregs[52]; 73extern struct io_reg CN400_ModeXregs[];
168extern struct io_reg CN700_ModeXregs[66]; 74extern struct io_reg CN700_ModeXregs[];
169extern struct io_reg KM400_ModeXregs[55]; 75extern struct io_reg KM400_ModeXregs[];
170extern struct io_reg CX700_ModeXregs[58]; 76extern struct io_reg CX700_ModeXregs[];
171extern struct io_reg VX800_ModeXregs[58]; 77extern struct io_reg VX800_ModeXregs[];
172extern struct io_reg CLE266_ModeXregs[32]; 78extern struct io_reg CLE266_ModeXregs[];
173extern struct io_reg PM1024x768[2]; 79extern struct io_reg PM1024x768[];
174extern struct patch_table res_patch_table[1]; 80extern struct patch_table res_patch_table[];
175extern struct VPITTable VPIT; 81extern struct VPITTable VPIT;
176#endif /* __VIAMODE_H__ */ 82#endif /* __VIAMODE_H__ */