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/console/fbcon.c | |
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/console/fbcon.c')
-rw-r--r-- | drivers/video/console/fbcon.c | 39 |
1 files changed, 10 insertions, 29 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 | } |