提交 7fe3915a 编写于 作者: J Jan Engelhardt 提交者: Linus Torvalds

vt/fbcon: update scrl_erase_char after 256/512-glyph font switch

Addendum to commit c9e587ab ("vt: fix
background color on line feed").

vc->vc_scrl_erase_char was not updated when fbcon switches between
256- and 512-glyph fonts.
Signed-off-by: NJan Engelhardt <jengelh@medozas.de>
Acked-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9fb1f68d
...@@ -2507,6 +2507,9 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, ...@@ -2507,6 +2507,9 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
c = vc->vc_video_erase_char; c = vc->vc_video_erase_char;
vc->vc_video_erase_char = vc->vc_video_erase_char =
((c & 0xfe00) >> 1) | (c & 0xff); ((c & 0xfe00) >> 1) | (c & 0xff);
c = vc->vc_def_color;
vc->vc_scrl_erase_char =
((c & 0xFE00) >> 1) | (c & 0xFF);
vc->vc_attr >>= 1; vc->vc_attr >>= 1;
} }
} else if (!vc->vc_hi_font_mask && cnt == 512) { } else if (!vc->vc_hi_font_mask && cnt == 512) {
...@@ -2537,9 +2540,14 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, ...@@ -2537,9 +2540,14 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
if (vc->vc_can_do_color) { if (vc->vc_can_do_color) {
vc->vc_video_erase_char = vc->vc_video_erase_char =
((c & 0xff00) << 1) | (c & 0xff); ((c & 0xff00) << 1) | (c & 0xff);
c = vc->vc_def_color;
vc->vc_scrl_erase_char =
((c & 0xFF00) << 1) | (c & 0xFF);
vc->vc_attr <<= 1; vc->vc_attr <<= 1;
} else } else {
vc->vc_video_erase_char = c & ~0x100; vc->vc_video_erase_char = c & ~0x100;
vc->vc_scrl_erase_char = c & ~0x100;
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册