Lines Matching +full:video +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* -*- linux-c -*- ------------------------------------------------------- *
5 * Copyright 2007 rPath, Inc. - All Rights Reserved
8 * ----------------------------------------------------------------------- */
11 * Select video mode
17 #include "video.h"
44 /* N.B.: the saving of the video page here is a bit silly, in store_video_mode()
56 * Store the video mode parameters for later usage by the kernel.
58 * parameters in the default 80x25 mode -- these are set directly,
66 /* For graphics mode, it is up to the mode-setting driver in store_mode_params()
67 (currently only video-vesa.c) to store the parameters */ in store_mode_params()
75 /* MDA, HGC, or VGA in monochrome mode */ in store_mode_params()
111 len--; in get_entry()
131 v += (key > '9') ? key-'a'+10 : key-'0'; in get_entry()
149 nmodes += card->nmodes; in display_menu()
156 puts("Mode: Resolution: Type: "); in display_menu()
162 mi = card->modes; in display_menu()
163 for (i = 0; i < card->nmodes; i++, mi++) { in display_menu()
165 int visible = mi->x && mi->y; in display_menu()
166 u16 mode_id = mi->mode ? mi->mode : in display_menu()
167 (mi->y << 8)+mi->x; in display_menu()
170 continue; /* Hidden mode */ in display_menu()
172 if (mi->depth) in display_menu()
173 sprintf(resbuf, "%dx%d", mi->y, mi->depth); in display_menu()
175 sprintf(resbuf, "%d", mi->y); in display_menu()
177 printf("%c %03X %4dx%-7s %-6s", in display_menu()
178 ch, mode_id, mi->x, resbuf, card->card_name); in display_menu()
197 #define H(x) ((x)-'a'+10)
205 puts("Press <ENTER> to see video modes available, " in mode_menu()
222 puts("Enter a video mode or \"scan\" to scan for " in mode_menu()
267 return; /* Can't restore onto a graphic mode */ in restore_screen()
283 npad = (xs < saved.x) ? 0 : xs-saved.x; in restore_screen()
304 saved.curx = xs-1; in restore_screen()
306 saved.cury = ys-1; in restore_screen()
319 u16 mode = boot_params.hdr.vid_mode; in set_video() local
328 if (mode == ASK_VGA) in set_video()
329 mode = mode_menu(); in set_video()
331 if (!set_mode(mode)) in set_video()
334 printf("Undefined video mode number: %x\n", mode); in set_video()
335 mode = ASK_VGA; in set_video()
337 boot_params.hdr.vid_mode = mode; in set_video()