diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2018-04-11 22:02:15 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2018-04-16 22:38:35 +0800 |
commit | ca5eb0c5fb8823a480bd7caecb456407d8098488 (patch) | |
tree | 09f1797eced2ef7b2f5fb8ee014563a9bd475e74 /arch/x86/lib | |
parent | 839c4e9c5bb09ac1ef2c129c7082a15b9cbd3a8a (diff) | |
download | u-boot-ca5eb0c5fb8823a480bd7caecb456407d8098488.tar.gz u-boot-ca5eb0c5fb8823a480bd7caecb456407d8098488.tar.bz2 u-boot-ca5eb0c5fb8823a480bd7caecb456407d8098488.zip |
bios: vesa: Guard setting vesa mode with CONFIG_FRAMEBUFFER_SET_VESA_MODE
If CONFIG_FRAMEBUFFER_SET_VESA_MODE is not set, don't switch
graphics card to VESA mode. This applies to both native mode
and emulator mode of running the VGA BIOS.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/bios.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index 66d7629a6d..f9092fdc65 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -185,6 +185,7 @@ static void setup_realmode_idt(void) write_idt_stub((void *)0xffe6e, 0x1a); } +#ifdef CONFIG_FRAMEBUFFER_SET_VESA_MODE static u8 vbe_get_mode_info(struct vbe_mode_info *mi) { u16 buffer_seg; @@ -241,6 +242,7 @@ static void vbe_set_graphics(int vesa_mode, struct vbe_mode_info *mode_info) mode_info->video_mode &= 0x3ff; vbe_set_mode(mode_info); } +#endif /* CONFIG_FRAMEBUFFER_SET_VESA_MODE */ void bios_run_on_x86(struct udevice *dev, unsigned long addr, int vesa_mode, struct vbe_mode_info *mode_info) @@ -273,8 +275,10 @@ void bios_run_on_x86(struct udevice *dev, unsigned long addr, int vesa_mode, 0x0); debug("done\n"); +#ifdef CONFIG_FRAMEBUFFER_SET_VESA_MODE if (vesa_mode != -1) vbe_set_graphics(vesa_mode, mode_info); +#endif } asmlinkage int interrupt_handler(u32 intnumber, u32 gsfs, u32 dses, |