vt/fbcon: fix background color on line feed

Another addendum to commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b
("vt: fix background color on line feed").

fbcon still was not doing the right thing (read: continued to do old
behavior). fbcon_clear() seems to clear the new line (e.g. where your new
prompt appears after doing echo -en "\e[42mfoo\n"), while scr_memsetw clears
the previous one only (where "foo" appears). So just temporarily set the
video_erase_char to the scrl_erase_char so that fbcon_clear does the right
thing.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Jan Engelhardt and committed by Linus Torvalds d850a2fa 7fe3915a

+16 -5
+16 -5
drivers/video/console/fbcon.c
··· 1853 1853 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; 1854 1854 struct display *p = &fb_display[vc->vc_num]; 1855 1855 int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK; 1856 + unsigned short saved_ec; 1857 + int ret; 1856 1858 1857 1859 if (fbcon_is_inactive(vc, info)) 1858 1860 return -EINVAL; ··· 1866 1864 * ++Andrew: Only use ypan on hardware text mode when scrolling the 1867 1865 * whole screen (prevents flicker). 1868 1866 */ 1867 + 1868 + saved_ec = vc->vc_video_erase_char; 1869 + vc->vc_video_erase_char = vc->vc_scrl_erase_char; 1870 + 1871 + ret = 0; 1869 1872 1870 1873 switch (dir) { 1871 1874 case SM_UP: ··· 1890 1883 (b - count)), 1891 1884 vc->vc_scrl_erase_char, 1892 1885 vc->vc_size_row * count); 1893 - return 1; 1886 + ret = 1; 1894 1887 break; 1895 1888 1896 1889 case SCROLL_WRAP_MOVE: ··· 1962 1955 (b - count)), 1963 1956 vc->vc_scrl_erase_char, 1964 1957 vc->vc_size_row * count); 1965 - return 1; 1958 + ret = 1; 1959 + break; 1966 1960 } 1967 1961 break; 1968 1962 ··· 1982 1974 t), 1983 1975 vc->vc_scrl_erase_char, 1984 1976 vc->vc_size_row * count); 1985 - return 1; 1977 + ret = 1; 1986 1978 break; 1987 1979 1988 1980 case SCROLL_WRAP_MOVE: ··· 2052 2044 t), 2053 2045 vc->vc_scrl_erase_char, 2054 2046 vc->vc_size_row * count); 2055 - return 1; 2047 + ret = 1; 2048 + break; 2056 2049 } 2050 + break; 2057 2051 } 2058 - return 0; 2052 + vc->vc_video_erase_char = saved_ec; 2053 + return ret; 2059 2054 } 2060 2055 2061 2056