Commit 0a88d609 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Core fbcon fixes

From: "Antonino A. Daplas" <adaplas@hotpop.com>

This patch fixes the following bugs/regressions for fbcon:

1.  Initialize and update global arrays used by fbcon during
   initialization and and by set_con2fbmap code.

2.  Fixed screen corruption (white rectangle) at initial mode setting
   plaguing cards with VGA cores and with VGA console enabled.  (vga16fb,
   however, still shows remnants of previous text if boot logo is enabled)

3. Improved fbcon_startup/fbcon_init code.

4. Fixed set_con2fbmap code -- should support multiple devices mapped to
Signed-off-by: default avatarAntonino A. Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4c03b073
This diff is collapsed.
...@@ -721,6 +721,7 @@ int fb_show_logo(struct fb_info *info) ...@@ -721,6 +721,7 @@ int fb_show_logo(struct fb_info *info)
u32 *palette = NULL, *saved_pseudo_palette = NULL; u32 *palette = NULL, *saved_pseudo_palette = NULL;
unsigned char *logo_new = NULL; unsigned char *logo_new = NULL;
struct fb_image image; struct fb_image image;
struct fb_fillrect rect;
int x; int x;
/* Return if the frame buffer is not mapped or suspended */ /* Return if the frame buffer is not mapped or suspended */
...@@ -766,6 +767,12 @@ int fb_show_logo(struct fb_info *info) ...@@ -766,6 +767,12 @@ int fb_show_logo(struct fb_info *info)
image.height = fb_logo.logo->height; image.height = fb_logo.logo->height;
image.dy = 0; image.dy = 0;
rect.dx = 0;
rect.dy = 0;
rect.color = 0;
rect.width = info->var.xres;
rect.height = fb_logo.logo->height;
info->fbops->fb_fillrect(info, &rect);
for (x = 0; x < num_online_cpus() * (fb_logo.logo->width + 8) && for (x = 0; x < num_online_cpus() * (fb_logo.logo->width + 8) &&
x <= info->var.xres-fb_logo.logo->width; x += (fb_logo.logo->width + 8)) { x <= info->var.xres-fb_logo.logo->width; x += (fb_logo.logo->width + 8)) {
image.dx = x; image.dx = x;
...@@ -1104,11 +1111,10 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -1104,11 +1111,10 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
#endif /* CONFIG_KMOD */ #endif /* CONFIG_KMOD */
if (!registered_fb[con2fb.framebuffer]) if (!registered_fb[con2fb.framebuffer])
return -EINVAL; return -EINVAL;
if (con2fb.console != 0) if (con2fb.console > 0 && con2fb.console < MAX_NR_CONSOLES)
set_con2fb_map(con2fb.console-1, con2fb.framebuffer); return set_con2fb_map(con2fb.console-1,
else con2fb.framebuffer);
fb_console_init(); return -EINVAL;
return 0;
#endif /* CONFIG_FRAMEBUFFER_CONSOLE */ #endif /* CONFIG_FRAMEBUFFER_CONSOLE */
case FBIOBLANK: case FBIOBLANK:
acquire_console_sem(); acquire_console_sem();
......
...@@ -539,6 +539,7 @@ struct fb_info { ...@@ -539,6 +539,7 @@ struct fb_info {
struct fb_monspecs monspecs; /* Current Monitor specs */ struct fb_monspecs monspecs; /* Current Monitor specs */
struct fb_cursor cursor; /* Current cursor */ struct fb_cursor cursor; /* Current cursor */
struct work_struct queue; /* Framebuffer event queue */ struct work_struct queue; /* Framebuffer event queue */
struct timer_list cursor_timer; /* Cursor timer */
struct fb_pixmap pixmap; /* Image hardware mapper */ struct fb_pixmap pixmap; /* Image hardware mapper */
struct fb_pixmap sprite; /* Cursor hardware mapper */ struct fb_pixmap sprite; /* Cursor hardware mapper */
struct fb_cmap cmap; /* Current cmap */ struct fb_cmap cmap; /* Current cmap */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment