aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/vt.c5
-rw-r--r--drivers/video/console/fbcon.c39
-rw-r--r--drivers/video/console/mdacon.c2
-rw-r--r--drivers/video/console/sticon.c4
-rw-r--r--drivers/video/console/vgacon.c4
-rw-r--r--include/linux/console_struct.h1
6 files changed, 17 insertions, 38 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 57029fefd64a..a0f7ffb68087 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -301,7 +301,7 @@ static void scrup(struct vc_data *vc, unsigned int t, unsigned int b, int nr)
301 d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t); 301 d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
302 s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * (t + nr)); 302 s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * (t + nr));
303 scr_memmovew(d, s, (b - t - nr) * vc->vc_size_row); 303 scr_memmovew(d, s, (b - t - nr) * vc->vc_size_row);
304 scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_scrl_erase_char, 304 scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_video_erase_char,
305 vc->vc_size_row * nr); 305 vc->vc_size_row * nr);
306} 306}
307 307
@@ -319,7 +319,7 @@ static void scrdown(struct vc_data *vc, unsigned int t, unsigned int b, int nr)
319 s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t); 319 s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
320 step = vc->vc_cols * nr; 320 step = vc->vc_cols * nr;
321 scr_memmovew(s + step, s, (b - t - nr) * vc->vc_size_row); 321 scr_memmovew(s + step, s, (b - t - nr) * vc->vc_size_row);
322 scr_memsetw(s, vc->vc_scrl_erase_char, 2 * step); 322 scr_memsetw(s, vc->vc_video_erase_char, 2 * step);
323} 323}
324 324
325static void do_update_region(struct vc_data *vc, unsigned long start, int count) 325static void do_update_region(struct vc_data *vc, unsigned long start, int count)
@@ -434,7 +434,6 @@ static void update_attr(struct vc_data *vc)
434 vc->vc_blink, vc->vc_underline, 434 vc->vc_blink, vc->vc_underline,
435 vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic); 435 vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic);
436 vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' '; 436 vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' ';
437 vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, vc->vc_decscnm, false) << 8) | ' ';
438} 437}
439 438
440/* Note: inverting the screen twice should revert to the original state */ 439/* Note: inverting the screen twice should revert to the original state */
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
534static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines) 534static 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;
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index b03f80a078be..d71f7c0f931b 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -53,7 +53,6 @@ struct vc_data {
53 unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */ 53 unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */
54 struct console_font vc_font; /* Current VC font set */ 54 struct console_font vc_font; /* Current VC font set */
55 unsigned short vc_video_erase_char; /* Background erase character */ 55 unsigned short vc_video_erase_char; /* Background erase character */
56 unsigned short vc_scrl_erase_char; /* Erase character for scroll */
57 /* VT terminal data */ 56 /* VT terminal data */
58 unsigned int vc_state; /* Escape sequence parser state */ 57 unsigned int vc_state; /* Escape sequence parser state */
59 unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */ 58 unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */