Lines Matching +full:video +full:- +full:mode
6 * SPDX-License-Identifier: GPL-2.0+
10 Get Parameters for the video mode:
11 The default video mode can be defined in CONFIG_SYS_DEFAULT_VIDEO_MODE.
12 If undefined, default video mode is set to 0x301
15 "videomode=301" - 301 is a hexadecimal number describing the VESA
16 mode. Following modes are implemented:
19 --------+---------------------------------------------
24 --------+---------------------------------------------
26 - the parameters are parsed from the bootargs.
29 "bootargs=video=ctfb:x:800,y:600,depth:16,pclk:25000"
31 the default mode, which is one of the following:
32 mode:0 640x480x24
33 mode:1 800x600x16
34 mode:2 1024x768x8
35 mode:3 960x720x24
36 mode:4 1152x864x16
37 mode:5 1280x1024x8
39 if "mode" is not provided within the parameter list,
40 mode:0 is assumed.
112 * Get Parameters for the video mode:
139 return -1; in video_search_param()
145 * video=ctfb:x:800,xv:1280,y:600,yv:1024,depth:16,mode:0,pclk:25000,
163 int mode; in video_get_params() local
174 * after "video=ctfb:" in video_get_params()
176 i = video_search_param (s, "video=ctfb:"); in video_get_params()
179 s += strlen ("video=ctfb:"); in video_get_params()
181 /* search for mode as a default value */ in video_get_params()
183 mode = 0; /* default */ in video_get_params()
186 GET_OPTION ("mode:", mode) in video_get_params()
192 if (mode >= RES_MODES_COUNT) in video_get_params()
193 mode = 0; in video_get_params()
195 *pPar = res_mode_init[mode]; /* copy default values */ in video_get_params()
196 bpp = 24 - ((mode % 3) * 8); 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()
222 * Parse the 'video-mode' environment variable
224 * Example: "video-mode=fslfb:1280x1024-32@60,monitor=dvi". See
225 * doc/README.video for more information on how to set the variable.
227 * @xres: returned value of X-resolution
228 * @yres: returned value of Y-resolution
238 char *p = env_get("video-mode"); in video_get_video_mode()
247 /* Get the X-resolution*/ in video_get_video_mode()
254 /* Get the Y-resolution */ in video_get_video_mode()
283 * Parse the 'video-mode' environment variable using video_get_video_mode()
286 * @default_mode: RES_MODE_##x## define for the mode to store in mode_ret
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
289 * @mode_ret: pointer where the mode will be stored
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()
341 len = i - (name_len + 1); in video_get_option_string()
343 len = dest_len - 1; in video_get_option_string()
384 * @param mode Returns the converted timing
389 struct ctfb_res_modes *mode) in video_edid_dtd_to_ctfb_res_modes() argument
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()
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()
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()