diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-01-30 07:33:02 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:02 -0500 |
commit | 1cac5004e953506166e980da5776d5cc1c176d79 (patch) | |
tree | da90c8870839b0445b45b39b473c8715afc31424 /arch/x86/boot/video-vesa.c | |
parent | 02a7b425e82cd0052e5eaedbae81a522c6aae6c4 (diff) |
x86 setup: display VESA graphics modes in vga=ask menu
Display VESA graphics modes, with their mode IDs, in the vga=ask
menu. Most VESA mode numbers are platform-dependent, so it helps to
have an easy way to display them.
Based in part on a patch by Petr Vandrovec <petr@vandrovec.name>.
Cc: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/boot/video-vesa.c')
-rw-r--r-- | arch/x86/boot/video-vesa.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c index 4716b9a96357..662dd2f13068 100644 --- a/arch/x86/boot/video-vesa.c +++ b/arch/x86/boot/video-vesa.c | |||
@@ -79,20 +79,28 @@ static int vesa_probe(void) | |||
79 | /* Text Mode, TTY BIOS supported, | 79 | /* Text Mode, TTY BIOS supported, |
80 | supported by hardware */ | 80 | supported by hardware */ |
81 | mi = GET_HEAP(struct mode_info, 1); | 81 | mi = GET_HEAP(struct mode_info, 1); |
82 | mi->mode = mode + VIDEO_FIRST_VESA; | 82 | mi->mode = mode + VIDEO_FIRST_VESA; |
83 | mi->x = vminfo.h_res; | 83 | mi->depth = 0; /* text */ |
84 | mi->y = vminfo.v_res; | 84 | mi->x = vminfo.h_res; |
85 | mi->y = vminfo.v_res; | ||
85 | nmodes++; | 86 | nmodes++; |
86 | } else if ((vminfo.mode_attr & 0x99) == 0x99) { | 87 | } else if ((vminfo.mode_attr & 0x99) == 0x99 && |
88 | (vminfo.memory_layout == 4 || | ||
89 | vminfo.memory_layout == 6) && | ||
90 | vminfo.memory_planes == 1) { | ||
87 | #ifdef CONFIG_FB | 91 | #ifdef CONFIG_FB |
88 | /* Graphics mode, color, linear frame buffer | 92 | /* Graphics mode, color, linear frame buffer |
89 | supported -- register the mode but hide from | 93 | supported. Only register the mode if |
90 | the menu. Only do this if framebuffer is | 94 | if framebuffer is configured, however, |
91 | configured, however, otherwise the user will | 95 | otherwise the user will be left without a screen. |
92 | be left without a screen. */ | 96 | We don't require CONFIG_FB_VESA, however, since |
97 | some of the other framebuffer drivers can use | ||
98 | this mode-setting, too. */ | ||
93 | mi = GET_HEAP(struct mode_info, 1); | 99 | mi = GET_HEAP(struct mode_info, 1); |
94 | mi->mode = mode + VIDEO_FIRST_VESA; | 100 | mi->mode = mode + VIDEO_FIRST_VESA; |
95 | mi->x = mi->y = 0; | 101 | mi->depth = vminfo.bpp; |
102 | mi->x = vminfo.h_res; | ||
103 | mi->y = vminfo.v_res; | ||
96 | nmodes++; | 104 | nmodes++; |
97 | #endif | 105 | #endif |
98 | } | 106 | } |