aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/video-vesa.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot/video-vesa.c')
-rw-r--r--arch/x86/boot/video-vesa.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c
index 401ad998ad0..75115849af3 100644
--- a/arch/x86/boot/video-vesa.c
+++ b/arch/x86/boot/video-vesa.c
@@ -20,7 +20,7 @@
20static struct vesa_general_info vginfo; 20static struct vesa_general_info vginfo;
21static struct vesa_mode_info vminfo; 21static struct vesa_mode_info vminfo;
22 22
23__videocard video_vesa; 23static __videocard video_vesa;
24 24
25#ifndef _WAKEUP 25#ifndef _WAKEUP
26static void vesa_store_mode_params_graphics(void); 26static void vesa_store_mode_params_graphics(void);
@@ -88,14 +88,11 @@ static int vesa_probe(void)
88 (vminfo.memory_layout == 4 || 88 (vminfo.memory_layout == 4 ||
89 vminfo.memory_layout == 6) && 89 vminfo.memory_layout == 6) &&
90 vminfo.memory_planes == 1) { 90 vminfo.memory_planes == 1) {
91#ifdef CONFIG_FB 91#ifdef CONFIG_FB_BOOT_VESA_SUPPORT
92 /* Graphics mode, color, linear frame buffer 92 /* Graphics mode, color, linear frame buffer
93 supported. Only register the mode if 93 supported. Only register the mode if
94 if framebuffer is configured, however, 94 if framebuffer is configured, however,
95 otherwise the user will be left without a screen. 95 otherwise the user will 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. */
99 mi = GET_HEAP(struct mode_info, 1); 96 mi = GET_HEAP(struct mode_info, 1);
100 mi->mode = mode + VIDEO_FIRST_VESA; 97 mi->mode = mode + VIDEO_FIRST_VESA;
101 mi->depth = vminfo.bpp; 98 mi->depth = vminfo.bpp;
@@ -133,10 +130,12 @@ static int vesa_set_mode(struct mode_info *mode)
133 if ((vminfo.mode_attr & 0x15) == 0x05) { 130 if ((vminfo.mode_attr & 0x15) == 0x05) {
134 /* It's a supported text mode */ 131 /* It's a supported text mode */
135 is_graphic = 0; 132 is_graphic = 0;
133#ifdef CONFIG_FB_BOOT_VESA_SUPPORT
136 } else if ((vminfo.mode_attr & 0x99) == 0x99) { 134 } else if ((vminfo.mode_attr & 0x99) == 0x99) {
137 /* It's a graphics mode with linear frame buffer */ 135 /* It's a graphics mode with linear frame buffer */
138 is_graphic = 1; 136 is_graphic = 1;
139 vesa_mode |= 0x4000; /* Request linear frame buffer */ 137 vesa_mode |= 0x4000; /* Request linear frame buffer */
138#endif
140 } else { 139 } else {
141 return -1; /* Invalid mode */ 140 return -1; /* Invalid mode */
142 } 141 }
@@ -224,7 +223,7 @@ static void vesa_store_pm_info(void)
224static void vesa_store_mode_params_graphics(void) 223static void vesa_store_mode_params_graphics(void)
225{ 224{
226 /* Tell the kernel we're in VESA graphics mode */ 225 /* Tell the kernel we're in VESA graphics mode */
227 boot_params.screen_info.orig_video_isVGA = 0x23; 226 boot_params.screen_info.orig_video_isVGA = VIDEO_TYPE_VLFB;
228 227
229 /* Mode parameters */ 228 /* Mode parameters */
230 boot_params.screen_info.vesa_attributes = vminfo.mode_attr; 229 boot_params.screen_info.vesa_attributes = vminfo.mode_attr;
@@ -294,7 +293,7 @@ void vesa_store_edid(void)
294 293
295#endif /* not _WAKEUP */ 294#endif /* not _WAKEUP */
296 295
297__videocard video_vesa = 296static __videocard video_vesa =
298{ 297{
299 .card_name = "VESA", 298 .card_name = "VESA",
300 .probe = vesa_probe, 299 .probe = vesa_probe,