Merge branch 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, setup: Don't skip mode setting for the standard VGA modes x86-64, setup: Inhibit decompressor output if video info is invalid x86, setup: When restoring the screen, update boot_params.screen_info
This commit is contained in:
@@ -180,11 +180,9 @@ static void __putstr(int error, const char *s)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
|
||||||
if (real_mode->screen_info.orig_video_mode == 0 &&
|
if (real_mode->screen_info.orig_video_mode == 0 &&
|
||||||
lines == 0 && cols == 0)
|
lines == 0 && cols == 0)
|
||||||
return;
|
return;
|
||||||
#endif
|
|
||||||
|
|
||||||
x = real_mode->screen_info.orig_x;
|
x = real_mode->screen_info.orig_x;
|
||||||
y = real_mode->screen_info.orig_y;
|
y = real_mode->screen_info.orig_y;
|
||||||
|
@@ -42,22 +42,15 @@ static u8 vga_set_basic_mode(void)
|
|||||||
{
|
{
|
||||||
struct biosregs ireg, oreg;
|
struct biosregs ireg, oreg;
|
||||||
u16 ax;
|
u16 ax;
|
||||||
u8 rows;
|
|
||||||
u8 mode;
|
u8 mode;
|
||||||
|
|
||||||
initregs(&ireg);
|
initregs(&ireg);
|
||||||
|
|
||||||
|
/* Query current mode */
|
||||||
ax = 0x0f00;
|
ax = 0x0f00;
|
||||||
intcall(0x10, &ireg, &oreg);
|
intcall(0x10, &ireg, &oreg);
|
||||||
mode = oreg.al;
|
mode = oreg.al;
|
||||||
|
|
||||||
set_fs(0);
|
|
||||||
rows = rdfs8(0x484); /* rows minus one */
|
|
||||||
|
|
||||||
if ((oreg.ax == 0x5003 || oreg.ax == 0x5007) &&
|
|
||||||
(rows == 0 || rows == 24))
|
|
||||||
return mode;
|
|
||||||
|
|
||||||
if (mode != 3 && mode != 7)
|
if (mode != 3 && mode != 7)
|
||||||
mode = 3;
|
mode = 3;
|
||||||
|
|
||||||
|
@@ -298,11 +298,18 @@ static void restore_screen(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Restore cursor position */
|
/* Restore cursor position */
|
||||||
|
if (saved.curx >= xs)
|
||||||
|
saved.curx = xs-1;
|
||||||
|
if (saved.cury >= ys)
|
||||||
|
saved.cury = ys-1;
|
||||||
|
|
||||||
initregs(&ireg);
|
initregs(&ireg);
|
||||||
ireg.ah = 0x02; /* Set cursor position */
|
ireg.ah = 0x02; /* Set cursor position */
|
||||||
ireg.dh = saved.cury;
|
ireg.dh = saved.cury;
|
||||||
ireg.dl = saved.curx;
|
ireg.dl = saved.curx;
|
||||||
intcall(0x10, &ireg, NULL);
|
intcall(0x10, &ireg, NULL);
|
||||||
|
|
||||||
|
store_cursor_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_video(void)
|
void set_video(void)
|
||||||
|
Reference in New Issue
Block a user