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 * Standard video BIOS modes
17 #include "video.h"
21 /* Set a conventional BIOS mode */
22 static int set_bios_mode(u8 mode);
26 return set_bios_mode(mi->mode - VIDEO_FIRST_BIOS); in bios_set_mode()
29 static int set_bios_mode(u8 mode) in set_bios_mode() argument
35 ireg.al = mode; /* AH=0x00 Set Video Mode */ in set_bios_mode()
38 ireg.ah = 0x0f; /* Get Current Video Mode */ in set_bios_mode()
41 do_restore = 1; /* Assume video contents were lost */ in set_bios_mode()
46 if (new_mode == mode) in set_bios_mode()
47 return 0; /* Mode change OK */ in set_bios_mode()
51 /* Mode setting failed, but we didn't end up where we in set_bios_mode()
53 video mode. */ in set_bios_mode()
58 return -1; in set_bios_mode()
63 u8 mode; in bios_probe() local
81 for (mode = 0x14; mode <= 0x7f; mode++) { in bios_probe()
85 if (mode_defined(VIDEO_FIRST_BIOS+mode)) in bios_probe()
88 if (set_bios_mode(mode)) in bios_probe()
91 /* Try to verify that it's a text mode. */ in bios_probe()
106 mi->mode = VIDEO_FIRST_BIOS+mode; in bios_probe()
107 mi->depth = 0; /* text */ in bios_probe()
108 mi->x = rdfs16(0x44a); in bios_probe()
109 mi->y = rdfs8(0x484)+1; in bios_probe()