18 #include <linux/errno.h>
20 #include <linux/string.h>
21 #include <linux/module.h>
32 #define DEFAULT_MODEDB_INDEX 0
37 "mac2", 60, 512, 384, 63828, 80, 16, 19, 1, 32, 3,
41 "mac5", 60, 640, 480, 39722, 32, 32, 33, 10, 96, 2,
45 "mac6", 67, 640, 480, 33334, 80, 80, 39, 3, 64, 3,
49 "mac7", 75, 640, 870, 17457, 80, 32, 42, 3, 80, 3,
53 "mac9", 56, 800, 600, 27778, 112, 40, 22, 1, 72, 2,
57 "mac10", 60, 800, 600, 25000, 72, 56, 23, 1, 128, 4,
61 "mac11", 72, 800, 600, 20000, 48, 72, 23, 37, 120, 6,
65 "mac12", 75, 800, 600, 20203, 144, 32, 21, 1, 80, 3,
69 "mac13", 75, 832, 624, 17362, 208, 48, 39, 1, 64, 3,
73 "mac14", 60, 1024, 768, 15385, 144, 40, 29, 3, 136, 6,
77 "mac15", 72, 1024, 768, 13334, 128, 40, 29, 3, 136, 6,
81 "mac16", 75, 1024, 768, 12699, 176, 16, 28, 1, 96, 3,
85 "mac17", 75, 1024, 768, 12699, 160, 32, 28, 1, 96, 3,
89 "mac18", 75, 1152, 870, 10000, 128, 48, 39, 3, 128, 3,
93 "mac19", 75, 1280, 960, 7937, 224, 32, 36, 1, 144, 3,
97 "mac20", 75, 1280, 1024, 7408, 232, 64, 38, 1, 112, 3,
101 "mac21", 60, 1152, 768, 15386, 158, 26, 29, 3, 136, 6,
105 "mac22", 60, 1600, 1024, 8908, 88, 104, 1, 10, 16, 1,
113 "mac1", 60, 512, 384,
pixclock,
left,
right, upper, lower, hslen, vslen,
117 "mac3", 50, 640, 480,
pixclock,
left,
right, upper, lower, hslen, vslen,
121 "mac4", 60, 640, 480,
pixclock,
left,
right, upper, lower, hslen, vslen,
125 "mac8", 50, 768, 576,
pixclock,
left,
right, upper, lower, hslen, vslen,
140 static const struct mode_map {
181 static const struct monitor_map {
224 const struct mode_map *
map;
226 for (map = mac_modes; map->vmode != -1; map++)
227 if (map->vmode == vmode) {
240 var->
green.offset = 0;
241 var->
green.length = 8;
242 var->
blue.offset = 0;
243 var->
blue.length = 8;
248 var->
red.offset = 10;
250 var->
green.offset = 5;
251 var->
green.length = 5;
252 var->
blue.offset = 0;
253 var->
blue.length = 5;
258 var->
red.offset = 16;
260 var->
green.offset = 8;
261 var->
green.length = 8;
262 var->
blue.offset = 0;
263 var->
blue.length = 8;
306 const struct mode_map *
map;
321 for (map = mac_modes; map->vmode != -1; map++) {
339 while (map->vmode != -1) {
369 const struct monitor_map *
map;
371 for (map = mac_monitors; map->sense != -1; map++)
372 if (map->sense == sense)
399 const char *mode_option,
unsigned int default_bpp)
402 unsigned int dbsize = 0;
404 if (mode_option && !
strncmp(mode_option,
"mac", 3)) {