summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-01 16:18:04 -0700
committerSimon Glass <sjg@chromium.org>2015-01-13 07:24:59 -0800
commitf4a6f0aed0be1f941aa786924c2fff0c01fbf91b (patch)
tree1574f8ba3a5032eaeb339e8098ba40ce79d17713 /arch/x86/lib
parent818f602112f5e789704096dbc4a7eb9f63fe5718 (diff)
downloadtalos-obmc-uboot-f4a6f0aed0be1f941aa786924c2fff0c01fbf91b.tar.gz
talos-obmc-uboot-f4a6f0aed0be1f941aa786924c2fff0c01fbf91b.zip
x86: Tidy up VESA mode numbers
There are some bits which should be ignored when displaying the mode number. Make sure that they are not included in the mode that is displayed. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/bios.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index 42853489fb..1d75cfc263 100644
--- a/arch/x86/lib/bios.c
+++ b/arch/x86/lib/bios.c
@@ -207,12 +207,14 @@ static u8 vbe_get_mode_info(struct vbe_mode_info *mi)
static u8 vbe_set_mode(struct vbe_mode_info *mi)
{
- debug("VBE: Setting VESA mode %#04x\n", mi->video_mode);
+ int video_mode = mi->video_mode;
+
+ debug("VBE: Setting VESA mode %#04x\n", video_mode);
/* request linear framebuffer mode */
- mi->video_mode |= (1 << 14);
+ video_mode |= (1 << 14);
/* don't clear the framebuffer, we do that later */
- mi->video_mode |= (1 << 15);
- realmode_interrupt(0x10, VESA_SET_MODE, mi->video_mode,
+ video_mode |= (1 << 15);
+ realmode_interrupt(0x10, VESA_SET_MODE, video_mode,
0x0000, 0x0000, 0x0000, 0x0000);
return 0;
@@ -236,6 +238,7 @@ static void vbe_set_graphics(int vesa_mode, struct vbe_mode_info *mode_info)
return;
}
+ mode_info->video_mode &= 0x3ff;
vbe_set_mode(mode_info);
}
OpenPOWER on IntegriCloud