diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-14 15:12:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-14 15:12:02 -0400 |
commit | 93f78da405685a756beeaeae4b5e41fcec39eab3 (patch) | |
tree | 98336d45e7d172380217181bf8b3507c4ecc9784 /drivers/video | |
parent | 43096597a4cc4bd3f912be8a69dbd12e27e08038 (diff) |
Revert "vt: fix background color on line feed"
This reverts commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b, and the
subsequent commits that fixed it up:
- afa9b649 "fbcon: prevent cursor disappearance after switching to 512
character font"
- d850a2fa "vt/fbcon: fix background color on line feed"
- 7fe3915a "vt/fbcon: update scrl_erase_char after 256/512-glyph font
switch"
by request of Alan Cox. Quoth Alan:
"Unfortunately it's wrong and its been causing breakages because
various apps like ncurses expect our previous (and correct)
behaviour."
Alexander sent out a similar patch.
Requested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Tested-by: Jan Engelhardt <jengelh@medozas.de>
Cc: Alexander V. Lukyanov <lav@netis.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/console/fbcon.c | 39 | ||||
-rw-r--r-- | drivers/video/console/mdacon.c | 2 | ||||
-rw-r--r-- | drivers/video/console/sticon.c | 4 | ||||
-rw-r--r-- | drivers/video/console/vgacon.c | 4 |
4 files changed, 15 insertions, 34 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 9cbff84b787d..da91bb16da8a 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -1855,8 +1855,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1855 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; | 1855 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; |
1856 | struct display *p = &fb_display[vc->vc_num]; | 1856 | struct display *p = &fb_display[vc->vc_num]; |
1857 | int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK; | 1857 | int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK; |
1858 | unsigned short saved_ec; | ||
1859 | int ret; | ||
1860 | 1858 | ||
1861 | if (fbcon_is_inactive(vc, info)) | 1859 | if (fbcon_is_inactive(vc, info)) |
1862 | return -EINVAL; | 1860 | return -EINVAL; |
@@ -1869,11 +1867,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1869 | * whole screen (prevents flicker). | 1867 | * whole screen (prevents flicker). |
1870 | */ | 1868 | */ |
1871 | 1869 | ||
1872 | saved_ec = vc->vc_video_erase_char; | ||
1873 | vc->vc_video_erase_char = vc->vc_scrl_erase_char; | ||
1874 | |||
1875 | ret = 0; | ||
1876 | |||
1877 | switch (dir) { | 1870 | switch (dir) { |
1878 | case SM_UP: | 1871 | case SM_UP: |
1879 | if (count > vc->vc_rows) /* Maximum realistic size */ | 1872 | if (count > vc->vc_rows) /* Maximum realistic size */ |
@@ -1890,9 +1883,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1890 | scr_memsetw((unsigned short *) (vc->vc_origin + | 1883 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1891 | vc->vc_size_row * | 1884 | vc->vc_size_row * |
1892 | (b - count)), | 1885 | (b - count)), |
1893 | vc->vc_scrl_erase_char, | 1886 | vc->vc_video_erase_char, |
1894 | vc->vc_size_row * count); | 1887 | vc->vc_size_row * count); |
1895 | ret = 1; | 1888 | return 1; |
1896 | break; | 1889 | break; |
1897 | 1890 | ||
1898 | case SCROLL_WRAP_MOVE: | 1891 | case SCROLL_WRAP_MOVE: |
@@ -1962,10 +1955,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1962 | scr_memsetw((unsigned short *) (vc->vc_origin + | 1955 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1963 | vc->vc_size_row * | 1956 | vc->vc_size_row * |
1964 | (b - count)), | 1957 | (b - count)), |
1965 | vc->vc_scrl_erase_char, | 1958 | vc->vc_video_erase_char, |
1966 | vc->vc_size_row * count); | 1959 | vc->vc_size_row * count); |
1967 | ret = 1; | 1960 | return 1; |
1968 | break; | ||
1969 | } | 1961 | } |
1970 | break; | 1962 | break; |
1971 | 1963 | ||
@@ -1982,9 +1974,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1982 | scr_memsetw((unsigned short *) (vc->vc_origin + | 1974 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1983 | vc->vc_size_row * | 1975 | vc->vc_size_row * |
1984 | t), | 1976 | t), |
1985 | vc->vc_scrl_erase_char, | 1977 | vc->vc_video_erase_char, |
1986 | vc->vc_size_row * count); | 1978 | vc->vc_size_row * count); |
1987 | ret = 1; | 1979 | return 1; |
1988 | break; | 1980 | break; |
1989 | 1981 | ||
1990 | case SCROLL_WRAP_MOVE: | 1982 | case SCROLL_WRAP_MOVE: |
@@ -2052,15 +2044,12 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
2052 | scr_memsetw((unsigned short *) (vc->vc_origin + | 2044 | scr_memsetw((unsigned short *) (vc->vc_origin + |
2053 | vc->vc_size_row * | 2045 | vc->vc_size_row * |
2054 | t), | 2046 | t), |
2055 | vc->vc_scrl_erase_char, | 2047 | vc->vc_video_erase_char, |
2056 | vc->vc_size_row * count); | 2048 | vc->vc_size_row * count); |
2057 | ret = 1; | 2049 | return 1; |
2058 | break; | ||
2059 | } | 2050 | } |
2060 | break; | ||
2061 | } | 2051 | } |
2062 | vc->vc_video_erase_char = saved_ec; | 2052 | return 0; |
2063 | return ret; | ||
2064 | } | 2053 | } |
2065 | 2054 | ||
2066 | 2055 | ||
@@ -2522,9 +2511,6 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, | |||
2522 | c = vc->vc_video_erase_char; | 2511 | c = vc->vc_video_erase_char; |
2523 | vc->vc_video_erase_char = | 2512 | vc->vc_video_erase_char = |
2524 | ((c & 0xfe00) >> 1) | (c & 0xff); | 2513 | ((c & 0xfe00) >> 1) | (c & 0xff); |
2525 | c = vc->vc_scrl_erase_char; | ||
2526 | vc->vc_scrl_erase_char = | ||
2527 | ((c & 0xFE00) >> 1) | (c & 0xFF); | ||
2528 | vc->vc_attr >>= 1; | 2514 | vc->vc_attr >>= 1; |
2529 | } | 2515 | } |
2530 | } else if (!vc->vc_hi_font_mask && cnt == 512) { | 2516 | } else if (!vc->vc_hi_font_mask && cnt == 512) { |
@@ -2555,14 +2541,9 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, | |||
2555 | if (vc->vc_can_do_color) { | 2541 | if (vc->vc_can_do_color) { |
2556 | vc->vc_video_erase_char = | 2542 | vc->vc_video_erase_char = |
2557 | ((c & 0xff00) << 1) | (c & 0xff); | 2543 | ((c & 0xff00) << 1) | (c & 0xff); |
2558 | c = vc->vc_scrl_erase_char; | ||
2559 | vc->vc_scrl_erase_char = | ||
2560 | ((c & 0xFF00) << 1) | (c & 0xFF); | ||
2561 | vc->vc_attr <<= 1; | 2544 | vc->vc_attr <<= 1; |
2562 | } else { | 2545 | } else |
2563 | vc->vc_video_erase_char = c & ~0x100; | 2546 | vc->vc_video_erase_char = c & ~0x100; |
2564 | vc->vc_scrl_erase_char = c & ~0x100; | ||
2565 | } | ||
2566 | } | 2547 | } |
2567 | 2548 | ||
2568 | } | 2549 | } |
diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index 9901064199bd..dd3eaaad4441 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c | |||
@@ -533,7 +533,7 @@ static void mdacon_cursor(struct vc_data *c, int mode) | |||
533 | 533 | ||
534 | static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines) | 534 | static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines) |
535 | { | 535 | { |
536 | u16 eattr = mda_convert_attr(c->vc_scrl_erase_char); | 536 | u16 eattr = mda_convert_attr(c->vc_video_erase_char); |
537 | 537 | ||
538 | if (!lines) | 538 | if (!lines) |
539 | return 0; | 539 | return 0; |
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 4055dbdd1b42..491c1c1baf4c 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c | |||
@@ -170,12 +170,12 @@ static int sticon_scroll(struct vc_data *conp, int t, int b, int dir, int count) | |||
170 | switch (dir) { | 170 | switch (dir) { |
171 | case SM_UP: | 171 | case SM_UP: |
172 | sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols); | 172 | sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols); |
173 | sti_clear(sti, b - count, 0, count, conp->vc_cols, conp->vc_scrl_erase_char); | 173 | sti_clear(sti, b - count, 0, count, conp->vc_cols, conp->vc_video_erase_char); |
174 | break; | 174 | break; |
175 | 175 | ||
176 | case SM_DOWN: | 176 | case SM_DOWN: |
177 | sti_bmove(sti, t, 0, t + count, 0, b - t - count, conp->vc_cols); | 177 | sti_bmove(sti, t, 0, t + count, 0, b - t - count, conp->vc_cols); |
178 | sti_clear(sti, t, 0, count, conp->vc_cols, conp->vc_scrl_erase_char); | 178 | sti_clear(sti, t, 0, count, conp->vc_cols, conp->vc_video_erase_char); |
179 | break; | 179 | break; |
180 | } | 180 | } |
181 | 181 | ||
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index bd1f57b259d9..6df29a62d720 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -1350,7 +1350,7 @@ static int vgacon_scroll(struct vc_data *c, int t, int b, int dir, | |||
1350 | } else | 1350 | } else |
1351 | c->vc_origin += delta; | 1351 | c->vc_origin += delta; |
1352 | scr_memsetw((u16 *) (c->vc_origin + c->vc_screenbuf_size - | 1352 | scr_memsetw((u16 *) (c->vc_origin + c->vc_screenbuf_size - |
1353 | delta), c->vc_scrl_erase_char, | 1353 | delta), c->vc_video_erase_char, |
1354 | delta); | 1354 | delta); |
1355 | } else { | 1355 | } else { |
1356 | if (oldo - delta < vga_vram_base) { | 1356 | if (oldo - delta < vga_vram_base) { |
@@ -1363,7 +1363,7 @@ static int vgacon_scroll(struct vc_data *c, int t, int b, int dir, | |||
1363 | } else | 1363 | } else |
1364 | c->vc_origin -= delta; | 1364 | c->vc_origin -= delta; |
1365 | c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; | 1365 | c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; |
1366 | scr_memsetw((u16 *) (c->vc_origin), c->vc_scrl_erase_char, | 1366 | scr_memsetw((u16 *) (c->vc_origin), c->vc_video_erase_char, |
1367 | delta); | 1367 | delta); |
1368 | } | 1368 | } |
1369 | c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; | 1369 | c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; |