Lines Matching +full:- +full:p

3  * Pierre Aubert, Staubli Faverges , <p.aubert@staubli.com>
6 * SPDX-License-Identifier: GPL-2.0+
15 "videomode=301" - 301 is a hexadecimal number describing the VESA
19 --------+---------------------------------------------
24 --------+---------------------------------------------
26 - the parameters are parsed from the bootargs.
132 char *p = start; in video_search_param() local
136 if (strncmp (p++, param, len) == 0) in video_search_param()
139 return -1; in video_search_param()
153 if(strncmp(p,name,strlen(name))==0) { \
154 val_s=p+strlen(name); \
160 char *p, *s, *val_s; in video_get_params() local
168 p = env_get(s); in video_get_params()
169 if (p) in video_get_params()
170 s = p; in video_get_params()
182 p = s; in video_get_params()
185 while ((i = video_get_param_len (p, ',')) != 0) { in video_get_params()
187 p += i; in video_get_params()
188 if (*p != 0) in video_get_params()
189 p++; /* skip ',' */ in video_get_params()
196 bpp = 24 - ((mode % 3) * 8); in video_get_params()
197 p = s; /* restart */ 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()
214 p += i; in video_get_params()
215 if (*p != 0) in video_get_params()
216 p++; /* skip ',' */ 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
238 char *p = env_get("video-mode"); in video_get_video_mode() local
239 if (!p) in video_get_video_mode()
243 p = strchr(p, ':'); in video_get_video_mode()
244 if (!p) in video_get_video_mode()
247 /* Get the X-resolution*/ in video_get_video_mode()
248 while (*p && !isdigit(*p)) in video_get_video_mode()
249 p++; in video_get_video_mode()
250 *xres = simple_strtoul(p, &p, 10); in video_get_video_mode()
254 /* Get the Y-resolution */ in video_get_video_mode()
255 while (*p && !isdigit(*p)) in video_get_video_mode()
256 p++; in video_get_video_mode()
257 *yres = simple_strtoul(p, &p, 10); in video_get_video_mode()
262 while (*p && !isdigit(*p)) in video_get_video_mode()
263 p++; in video_get_video_mode()
264 *depth = simple_strtoul(p, &p, 10); in video_get_video_mode()
269 while (*p && !isdigit(*p)) in video_get_video_mode()
270 p++; in video_get_video_mode()
271 *freq = simple_strtoul(p, &p, 10); in video_get_video_mode()
276 p = strchr(p, ','); in video_get_video_mode()
277 *options = p ? p + 1 : NULL; 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
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()
335 const char *p = options; in video_get_option_string() local
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()
344 memcpy(dest, &p[name_len + 1], len); in video_get_option_string()
348 p += i; in video_get_option_string()
349 if (*p != 0) in video_get_option_string()
350 p++; /* skip ',' */ in video_get_option_string()
365 const char *p = options; in video_get_option_int() local
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()
371 return simple_strtoul(&p[name_len + 1], NULL, 10); in video_get_option_int()
373 p += i; in video_get_option_int()
374 if (*p != 0) in video_get_option_int()
375 p++; /* skip ',' */ in video_get_option_int()
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()