aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/viamode.h
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-03-10 18:21:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:33 -0500
commitdd73d6868b9ecb4841def0c6ff0a25da27db33ba (patch)
tree353558254ac6ad9561beb6f3bac7b5254301c95c /drivers/video/via/viamode.h
parent2365dfe99495159b3395dd0eddece2f0d58f527a (diff)
viafb: split global index up
This is the first step to remove an artificial global index that was used in two ways: 1. As a pseudo index in the mode table. Pseudo as you had to search through the table to find the referenced entry. This was replaced by using a pointer to the entry. 2. As a shortcut to compare a combination of horizontal and vertical resolution at the same time. This was replaced by a "(hres<<16) | vres" which is good enough for now and the near future. If vres or hres become greater than 2^16 this might indeed cause problems but this solution allows to split this indexing mess up without the requirement to do even more code changes. This is a big change that will allow more clean ups. It should be a bit faster but that is probably not relevant for normal operation. No regressions expected but as this is a relatively big step heavy testing is appreciated. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Scott Fang <ScottFang@viatech.com.cn> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/via/viamode.h')
-rw-r--r--drivers/video/via/viamode.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/via/viamode.h b/drivers/video/via/viamode.h
index a9d6554fabdf..5b1ced86514b 100644
--- a/drivers/video/via/viamode.h
+++ b/drivers/video/via/viamode.h
@@ -32,13 +32,11 @@ struct VPITTable {
32}; 32};
33 33
34struct VideoModeTable { 34struct VideoModeTable {
35 int ModeIndex;
36 struct crt_mode_table *crtc; 35 struct crt_mode_table *crtc;
37 int mode_array; 36 int mode_array;
38}; 37};
39 38
40struct patch_table { 39struct patch_table {
41 int mode_index;
42 int table_length; 40 int table_length;
43 struct io_reg *io_reg_table; 41 struct io_reg *io_reg_table;
44}; 42};
@@ -59,13 +57,11 @@ extern int NUM_TOTAL_CX700_ModeXregs;
59extern int NUM_TOTAL_VX855_ModeXregs; 57extern int NUM_TOTAL_VX855_ModeXregs;
60extern int NUM_TOTAL_CLE266_ModeXregs; 58extern int NUM_TOTAL_CLE266_ModeXregs;
61extern int NUM_TOTAL_PATCH_MODE; 59extern int NUM_TOTAL_PATCH_MODE;
62extern int NUM_TOTAL_MODETABLE;
63 60
64/********************/ 61/********************/
65/* Mode Table */ 62/* Mode Table */
66/********************/ 63/********************/
67 64
68extern struct VideoModeTable CLE266Modes[];
69extern struct crt_mode_table CEAM1280x720[]; 65extern struct crt_mode_table CEAM1280x720[];
70extern struct crt_mode_table CEAM1920x1080[]; 66extern struct crt_mode_table CEAM1920x1080[];
71extern struct VideoModeTable CEA_HDMI_Modes[]; 67extern struct VideoModeTable CEA_HDMI_Modes[];
@@ -81,4 +77,8 @@ extern struct io_reg CLE266_ModeXregs[];
81extern struct io_reg PM1024x768[]; 77extern struct io_reg PM1024x768[];
82extern struct patch_table res_patch_table[]; 78extern struct patch_table res_patch_table[];
83extern struct VPITTable VPIT; 79extern struct VPITTable VPIT;
80
81struct VideoModeTable *viafb_get_mode(int hres, int vres);
82struct VideoModeTable *viafb_get_rb_mode(int hres, int vres);
83
84#endif /* __VIAMODE_H__ */ 84#endif /* __VIAMODE_H__ */