Lines Matching +full:0 +full:- +full:1152
6 * SPDX-License-Identifier: GPL-2.0+
12 If undefined, default video mode is set to 0x301
15 "videomode=301" - 301 is a hexadecimal number describing the VESA
18 Colors 640x480 800x600 1024x768 1152x864 1280x1024
19 --------+---------------------------------------------
20 8 bits | 0x301 0x303 0x305 0x161 0x307
21 15 bits | 0x310 0x313 0x316 0x162 0x319
22 16 bits | 0x311 0x314 0x317 0x163 0x31A
23 24 bits | 0x312 0x315 0x318 ? 0x31B
24 --------+---------------------------------------------
26 - the parameters are parsed from the bootargs.
32 mode:0 640x480x24
36 mode:4 1152x864x16
40 mode:0 is assumed.
68 {0x301, RES_MODE_640x480, 8},
69 {0x310, RES_MODE_640x480, 15},
70 {0x311, RES_MODE_640x480, 16},
71 {0x312, RES_MODE_640x480, 24},
72 {0x303, RES_MODE_800x600, 8},
73 {0x313, RES_MODE_800x600, 15},
74 {0x314, RES_MODE_800x600, 16},
75 {0x315, RES_MODE_800x600, 24},
76 {0x305, RES_MODE_1024x768, 8},
77 {0x316, RES_MODE_1024x768, 15},
78 {0x317, RES_MODE_1024x768, 16},
79 {0x318, RES_MODE_1024x768, 24},
80 {0x161, RES_MODE_1152x864, 8},
81 {0x162, RES_MODE_1152x864, 15},
82 {0x163, RES_MODE_1152x864, 16},
83 {0x307, RES_MODE_1280x1024, 8},
84 {0x319, RES_MODE_1280x1024, 15},
85 {0x31A, RES_MODE_1280x1024, 16},
86 {0x31B, RES_MODE_1280x1024, 24},
91 { 640, 480, 60, 39721, 25180, 40, 24, 32, 11, 96, 2, 0, FB_VMODE_NONINTERLACED},
92 { 800, 600, 60, 27778, 36000, 64, 24, 22, 1, 72, 2, 0, FB_VMODE_NONINTERLACED},
93 {1024, 768, 60, 15384, 65000, 168, 8, 29, 3, 144, 4, 0, FB_VMODE_NONINTERLACED},
94 { 960, 720, 80, 13100, 76335, 160, 40, 32, 8, 80, 4, 0, FB_VMODE_NONINTERLACED},
95 {1152, 864, 60, 12004, 83300, 200, 64, 32, 16, 80, 4, 0, FB_VMODE_NONINTERLACED},
96 {1280, 1024, 60, 9090, 110000, 200, 48, 26, 1, 184, 3, 0, FB_VMODE_NONINTERLACED},
98 { 640, 480, 60, 39683, 25200, 48, 16, 33, 10, 96, 2, 0, FB_VMODE_NONINTERLACED},
100 {1024, 768, 60, 15384, 65000, 160, 24, 29, 3, 136, 6, 0, FB_VMODE_NONINTERLACED},
101 { 960, 720, 75, 13468, 74250, 176, 72, 27, 1, 112, 2, 0, FB_VMODE_NONINTERLACED},
102 …{1152, 864, 75, 9259, 108000, 256, 64, 32, 1, 128, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH…
106 {1360, 768, 60, 11696, 85500, 256, 64, 17, 3, 112, 7, 0, FB_VMODE_NONINTERLACED},
120 int i = 0; in video_get_param_len()
121 while ((*start != 0) && (*start != sep)) { in video_get_param_len()
135 for (i = 0; i < totallen; i++) { in video_search_param()
136 if (strncmp (p++, param, len) == 0) in video_search_param()
139 return -1; in video_search_param()
145 * video=ctfb:x:800,xv:1280,y:600,yv:1024,depth:16,mode:0,pclk:25000,
146 * le:56,ri:48,up:26,lo:5,hs:152,vs:2,sync:0,vmode:0,accel:0
153 if(strncmp(p,name,strlen(name))==0) { \
161 int i = 0; in video_get_params()
177 if (i >= 0) { in video_get_params()
183 mode = 0; /* default */ in video_get_params()
185 while ((i = video_get_param_len (p, ',')) != 0) { in video_get_params()
188 if (*p != 0) in video_get_params()
193 mode = 0; in video_get_params()
196 bpp = 24 - ((mode % 3) * 8); in video_get_params()
199 while ((i = video_get_param_len (p, ',')) != 0) { in video_get_params()
200 GET_OPTION ("x:", pPar->xres) in video_get_params()
201 GET_OPTION ("y:", pPar->yres) in video_get_params()
202 GET_OPTION ("refresh:", pPar->refresh) in video_get_params()
203 GET_OPTION ("le:", pPar->left_margin) in video_get_params()
204 GET_OPTION ("ri:", pPar->right_margin) in video_get_params()
205 GET_OPTION ("up:", pPar->upper_margin) in video_get_params()
206 GET_OPTION ("lo:", pPar->lower_margin) in video_get_params()
207 GET_OPTION ("hs:", pPar->hsync_len) in video_get_params()
208 GET_OPTION ("vs:", pPar->vsync_len) in video_get_params()
209 GET_OPTION ("sync:", pPar->sync) in video_get_params()
210 GET_OPTION ("vmode:", pPar->vmode) in video_get_params()
211 GET_OPTION ("pclk:", pPar->pixclock) in video_get_params()
212 GET_OPTION ("pclk_khz:", pPar->pixclock_khz) in video_get_params()
215 if (*p != 0) in video_get_params()
222 * Parse the 'video-mode' environment variable
224 * Example: "video-mode=fslfb:1280x1024-32@60,monitor=dvi". See
227 * @xres: returned value of X-resolution
228 * @yres: returned value of Y-resolution
233 * Returns 1 if valid values were found, 0 otherwise
238 char *p = env_get("video-mode"); in video_get_video_mode()
240 return 0; in video_get_video_mode()
245 return 0; in video_get_video_mode()
247 /* Get the X-resolution*/ in video_get_video_mode()
252 return 0; in video_get_video_mode()
254 /* Get the Y-resolution */ in video_get_video_mode()
259 return 0; in video_get_video_mode()
266 return 0; in video_get_video_mode()
273 return 0; in video_get_video_mode()
283 * Parse the 'video-mode' environment variable using video_get_video_mode()
287 * when 'video-mode' is not set or does not contain a valid mode
288 * @default_depth: depth to set when 'video-mode' is not set
307 for (i = 0; i < RES_MODES_COUNT; i++) { in video_get_ctfb_res_modes()
317 printf("video-mode %dx%d-%d@%d not available, falling back to %dx%d-%d@%d\n", in video_get_ctfb_res_modes()
318 xres, yres, depth, refresh, (*mode_ret)->xres, in video_get_ctfb_res_modes()
319 (*mode_ret)->yres, *depth_ret, (*mode_ret)->refresh); in video_get_ctfb_res_modes()
339 while (p && (i = video_get_param_len(p, ',')) != 0) { in video_get_option_string()
340 if (strncmp(p, name, name_len) == 0 && p[name_len] == '=') { in video_get_option_string()
341 len = i - (name_len + 1); in video_get_option_string()
343 len = dest_len - 1; in video_get_option_string()
345 dest[len] = 0; in video_get_option_string()
349 if (*p != 0) in video_get_option_string()
369 while (p && (i = video_get_param_len(p, ',')) != 0) { in video_get_option_int()
370 if (strncmp(p, name, name_len) == 0 && p[name_len] == '=') in video_get_option_int()
374 if (*p != 0) in video_get_option_int()
386 * @return 0 on success, or a negative errno on error
393 /* Check all timings are non 0 */ in video_edid_dtd_to_ctfb_res_modes()
394 if (EDID_DETAILED_TIMING_PIXEL_CLOCK(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
395 EDID_DETAILED_TIMING_HORIZONTAL_ACTIVE(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
396 EDID_DETAILED_TIMING_HORIZONTAL_BLANKING(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
397 EDID_DETAILED_TIMING_VERTICAL_ACTIVE(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
398 EDID_DETAILED_TIMING_VERTICAL_BLANKING(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
399 EDID_DETAILED_TIMING_HSYNC_OFFSET(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
400 EDID_DETAILED_TIMING_HSYNC_PULSE_WIDTH(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
401 EDID_DETAILED_TIMING_VSYNC_OFFSET(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
402 EDID_DETAILED_TIMING_VSYNC_PULSE_WIDTH(*t) == 0 || in video_edid_dtd_to_ctfb_res_modes()
404 EDID_DETAILED_TIMING_FLAG_STEREO(*t) != 0) in video_edid_dtd_to_ctfb_res_modes()
405 return -EINVAL; in video_edid_dtd_to_ctfb_res_modes()
407 mode->xres = EDID_DETAILED_TIMING_HORIZONTAL_ACTIVE(*t); in video_edid_dtd_to_ctfb_res_modes()
408 mode->yres = EDID_DETAILED_TIMING_VERTICAL_ACTIVE(*t); in video_edid_dtd_to_ctfb_res_modes()
410 h_total = mode->xres + EDID_DETAILED_TIMING_HORIZONTAL_BLANKING(*t); in video_edid_dtd_to_ctfb_res_modes()
411 v_total = mode->yres + EDID_DETAILED_TIMING_VERTICAL_BLANKING(*t); in video_edid_dtd_to_ctfb_res_modes()
412 mode->refresh = EDID_DETAILED_TIMING_PIXEL_CLOCK(*t) / in video_edid_dtd_to_ctfb_res_modes()
415 mode->pixclock_khz = EDID_DETAILED_TIMING_PIXEL_CLOCK(*t) / 1000; in video_edid_dtd_to_ctfb_res_modes()
416 mode->pixclock = 1000000000L / mode->pixclock_khz; in video_edid_dtd_to_ctfb_res_modes()
418 mode->right_margin = EDID_DETAILED_TIMING_HSYNC_OFFSET(*t); in video_edid_dtd_to_ctfb_res_modes()
419 mode->hsync_len = EDID_DETAILED_TIMING_HSYNC_PULSE_WIDTH(*t); in video_edid_dtd_to_ctfb_res_modes()
420 margin = EDID_DETAILED_TIMING_HORIZONTAL_BLANKING(*t) - in video_edid_dtd_to_ctfb_res_modes()
421 (mode->right_margin + mode->hsync_len); in video_edid_dtd_to_ctfb_res_modes()
422 if (margin <= 0) in video_edid_dtd_to_ctfb_res_modes()
423 return -EINVAL; in video_edid_dtd_to_ctfb_res_modes()
425 mode->left_margin = margin; in video_edid_dtd_to_ctfb_res_modes()
427 mode->lower_margin = EDID_DETAILED_TIMING_VSYNC_OFFSET(*t); in video_edid_dtd_to_ctfb_res_modes()
428 mode->vsync_len = EDID_DETAILED_TIMING_VSYNC_PULSE_WIDTH(*t); in video_edid_dtd_to_ctfb_res_modes()
429 margin = EDID_DETAILED_TIMING_VERTICAL_BLANKING(*t) - in video_edid_dtd_to_ctfb_res_modes()
430 (mode->lower_margin + mode->vsync_len); in video_edid_dtd_to_ctfb_res_modes()
431 if (margin <= 0) in video_edid_dtd_to_ctfb_res_modes()
432 return -EINVAL; in video_edid_dtd_to_ctfb_res_modes()
434 mode->upper_margin = margin; in video_edid_dtd_to_ctfb_res_modes()
436 mode->sync = 0; in video_edid_dtd_to_ctfb_res_modes()
438 mode->sync |= FB_SYNC_HOR_HIGH_ACT; in video_edid_dtd_to_ctfb_res_modes()
440 mode->sync |= FB_SYNC_VERT_HIGH_ACT; in video_edid_dtd_to_ctfb_res_modes()
443 mode->vmode = FB_VMODE_INTERLACED; in video_edid_dtd_to_ctfb_res_modes()
445 mode->vmode = FB_VMODE_NONINTERLACED; in video_edid_dtd_to_ctfb_res_modes()
447 return 0; in video_edid_dtd_to_ctfb_res_modes()